# infolab.ledonut-marseille.org — Le Donut Infolab (API JSON + SPA Vue) # # - /api/* -> reverse_proxy vers le conteneur donut-infolab (PHP/Apache, 127.0.0.1:8003) # - tout le reste -> SPA Vue (build statique dans /srv/donut/web/infolab-front/dist) # avec fallback /index.html pour le router HTML5 (Vue Router en mode history). infolab.ledonut-marseille.org { encode gzip zstd # Headers de sécurité de base header { Strict-Transport-Security "max-age=31536000; includeSubDomains" X-Content-Type-Options "nosniff" Referrer-Policy "strict-origin-when-cross-origin" -Server } # API JSON -> conteneur PHP (sur réseau Docker local, exposé en 127.0.0.1:8003) @api path /api/* handle @api { reverse_proxy 127.0.0.1:8003 { header_up Host {host} header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} header_up X-Forwarded-Proto {scheme} } } # SPA Vue : sert dist/ avec fallback index.html pour le routing client-side. handle { root * /srv/donut/web/infolab-front/dist try_files {path} /index.html file_server { precompressed gzip } # Cache long pour les assets fingerprintés Vite, court pour index.html. @assets path /assets/* header @assets Cache-Control "public, max-age=31536000, immutable" @html path /index.html header @html Cache-Control "no-cache, no-store, must-revalidate" } }