From 602bdc45583dec65549e46721e6fde98fdcb13f0 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Tue, 14 Oct 2025 04:04:30 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20configurar=20rutas=20p=C3=BAblicas=20en?= =?UTF-8?q?=20Traefik=20para=20assets=20de=20Nuxt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Exponer solo /_nuxt/* sin autenticación (necesario para funcionamiento) - Mantener autenticación Authentik en todas las demás rutas - Priorizar seguridad: /api/*, manifest y favicon protegidos --- docker-compose.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d7c36dd..70b04d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,12 +32,23 @@ services: # Service - "traefik.http.services.${APP_NAME}.loadbalancer.server.port=3000" - # Router principal con Authentik Forward Auth + # Router para assets estáticos de Nuxt (sin autenticación) - mayor prioridad + # SOLO /_nuxt/* para que la aplicación funcione + - "traefik.http.routers.${APP_NAME}-public.rule=Host(`${APP_DOMAIN}`) && PathPrefix(`/_nuxt`)" + - "traefik.http.routers.${APP_NAME}-public.entrypoints=websecure" + - "traefik.http.routers.${APP_NAME}-public.tls=true" + - "traefik.http.routers.${APP_NAME}-public.tls.certresolver=letsencrypt" + - "traefik.http.routers.${APP_NAME}-public.service=${APP_NAME}" + - "traefik.http.routers.${APP_NAME}-public.priority=100" + - "traefik.http.routers.${APP_NAME}-public.middlewares=${APP_NAME}-headers" + + # Router principal con Authentik Forward Auth (menor prioridad) - "traefik.http.routers.${APP_NAME}.rule=Host(`${APP_DOMAIN}`)" - "traefik.http.routers.${APP_NAME}.entrypoints=websecure" - "traefik.http.routers.${APP_NAME}.tls=true" - "traefik.http.routers.${APP_NAME}.tls.certresolver=letsencrypt" - "traefik.http.routers.${APP_NAME}.service=${APP_NAME}" + - "traefik.http.routers.${APP_NAME}.priority=50" - "traefik.http.routers.${APP_NAME}.middlewares=authentik-forward-auth@file,${APP_NAME}-headers" # Custom headers middleware