Fix: Agregar ruta /_nuxt al router público de Traefik
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 16s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 16s
Problema: La aplicación mostraba error 500 porque los assets
de Nuxt (JavaScript, CSS) en /_nuxt no podían cargarse.
Solución:
- Agregar PathPrefix('/_nuxt') al router público
- Eliminar middleware CORS innecesario del router público
Esto alinea la configuración con analiticaNucleo que funciona
correctamente.
This commit is contained in:
@@ -52,12 +52,12 @@ services:
|
||||
- "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000"
|
||||
|
||||
# Router 1: Public PWA resources (no auth) - Higher priority
|
||||
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && (PathPrefix(`/manifest.webmanifest`) || PathPrefix(`/sw.js`) || PathPrefix(`/workbox-`) || PathPrefix(`/icon-`) || PathPrefix(`/apple-touch-icon`) || PathPrefix(`/favicon.ico`) || PathPrefix(`/robots.txt`) || PathPrefix(`/offline.html`) || PathPrefix(`/api/_nuxt_icon/`))"
|
||||
- "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/manifest.webmanifest`) || PathPrefix(`/sw.js`) || PathPrefix(`/workbox-`) || PathPrefix(`/icon-`) || PathPrefix(`/apple-touch-icon`) || PathPrefix(`/favicon.ico`) || PathPrefix(`/robots.txt`) || PathPrefix(`/offline.html`) || PathPrefix(`/api/_nuxt_icon/`))"
|
||||
- "traefik.http.routers.${APP_NAME}-public.entrypoints=websecure"
|
||||
- "traefik.http.routers.${APP_NAME}-public.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.${APP_NAME}-public.priority=100"
|
||||
- "traefik.http.routers.${APP_NAME}-public.service=${APP_NAME}"
|
||||
- "traefik.http.routers.${APP_NAME}-public.middlewares=${APP_NAME}-headers,${APP_NAME}-cors"
|
||||
- "traefik.http.routers.${APP_NAME}-public.middlewares=${APP_NAME}-headers"
|
||||
|
||||
# Router 2: Protected application (with auth) - Normal priority
|
||||
- "traefik.http.routers.${APP_NAME}.rule=Host(`${APP_DOMAIN}`)"
|
||||
|
||||
Reference in New Issue
Block a user