Explorar o código

Updates route middleware for development pages

Updates the route middleware to handle development-specific pages based on the environment.

This change introduces an `inDevPages` array to control access to certain routes based on the environment configuration.
This allows for better control over feature availability during development and production stages.
Olivier Massot hai 10 meses
pai
achega
abdcaa0d65
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      middleware/routing.global.ts

+ 3 - 1
middleware/routing.global.ts

@@ -16,10 +16,12 @@ export default defineNuxtRouteMiddleware((to, _) => {
     const name: string = routeName?.toString() ?? ''
 
     // <<- TODO: remove after 2.6 release
+    const inDevPages = []
+
     const runtimeConfig = useRuntimeConfig()
     if (
       runtimeConfig.public.env === 'production' &&
-      name === 'cmf_licence_page'
+      inDevPages.includes(name)
     ) {
       const { redirectToHome } = useRedirect()
       redirectToHome()