seguimos
This commit is contained in:
@@ -17,9 +17,11 @@ services:
|
||||
- "traefik.enable=true"
|
||||
|
||||
# ==========================================
|
||||
# Router público para recursos PWA (sin autenticación)
|
||||
# Router público para recursos PWA ESTÁTICOS (sin autenticación)
|
||||
# IMPORTANTE: Solo assets estáticos (JS, CSS, iconos, manifest, SW)
|
||||
# Las APIs (/api/*) NO están aquí - están protegidas abajo
|
||||
# ==========================================
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.rule=Host(`musica.nucleoriofrio.com`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/assets`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/manifest.webmanifest`) || Path(`/manifest.json`) || Path(`/robots.txt`) || Path(`/favicon.ico`) || Path(`/logo.png`) || Path(`/logo-192.png`) || Path(`/logo-512.png`) || Path(`/logo-maskable-512.png`) || Path(`/icon.svg`))"
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.rule=Host(`musica.nucleoriofrio.com`) && (PathPrefix(`/_nuxt`) || PathPrefix(`/assets`) || Path(`/sw.js`) || PathPrefix(`/workbox-`) || Path(`/manifest.webmanifest`) || Path(`/manifest.json`) || Path(`/robots.txt`) || Path(`/favicon.ico`) || Path(`/logo.png`) || Path(`/logo-192.png`) || Path(`/logo-512.png`) || Path(`/logo-maskable-512.png`) || Path(`/icon.svg`)) && !PathPrefix(`/api/`)"
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.entrypoints=websecure"
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.priority=100"
|
||||
@@ -28,8 +30,19 @@ services:
|
||||
- "traefik.http.routers.musica-nucleoriofrio-public.service=musica-nucleoriofrio-service"
|
||||
|
||||
# ==========================================
|
||||
# Router protegido para el resto de la app
|
||||
# Router protegido para el resto de la app (incluye /api/music)
|
||||
# ==========================================
|
||||
# IMPORTANTE: Todas las APIs (/api/*) pasan por aquí
|
||||
# - /api/music → Lista de canciones (requiere auth)
|
||||
# - /api/music/:name → Descarga de canción (requiere auth)
|
||||
# - Página principal (/) → Requiere auth
|
||||
#
|
||||
# Flujo PWA + Authentik:
|
||||
# 1. Usuario sin auth intenta acceder → Authentik redirige a login
|
||||
# 2. Usuario con auth accede → Puede listar y descargar música
|
||||
# 3. Música descargada se guarda en IndexedDB (stores/music.ts)
|
||||
# 4. Usuario offline → Service Worker sirve desde cache
|
||||
# 5. Usuario offline SIN cache → Falla graciosamente (no puede descargar sin auth)
|
||||
- "traefik.http.routers.musica-nucleoriofrio.rule=Host(`musica.nucleoriofrio.com`)"
|
||||
- "traefik.http.routers.musica-nucleoriofrio.entrypoints=websecure"
|
||||
- "traefik.http.routers.musica-nucleoriofrio.tls.certresolver=letsencrypt"
|
||||
|
||||
Reference in New Issue
Block a user