From 3cc43594777b6ee39a141069a85133c647dc0c72 Mon Sep 17 00:00:00 2001 From: Consult AS Technology Date: Tue, 1 Sep 2026 22:25:52 +0000 Subject: [PATCH] fix(nginx): index.html con Cache-Control no-cache en todas las apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sin headers, el navegador cacheaba el HTML de entrada y los deploys nuevos no se veían hasta limpiar caché (el caso del botón de Alta Afluencia). Los assets de Vite llevan hash y no se afectan. --- deploy/nginx-host.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deploy/nginx-host.conf b/deploy/nginx-host.conf index b46d7c8..be2aecb 100644 --- a/deploy/nginx-host.conf +++ b/deploy/nginx-host.conf @@ -1,11 +1,21 @@ # FRASA Ecosystem — nginx del host (modo HTTP, LAN) # Instalado en /etc/nginx/sites-available/frasa + +# index.html siempre se revalida (los assets de Vite llevan hash en el nombre, +# así que solo el HTML necesita no-cache para que los deploys se vean al momento) +map $uri $frasa_cache_control { + ~*\.html$ "no-cache"; + default ""; +} + server { listen 80 default_server; server_name _; client_max_body_size 10m; + add_header Cache-Control $frasa_cache_control always; + # API Gateway (servicio systemd frasa-api en 127.0.0.1:3000) location /api/ { proxy_pass http://127.0.0.1:3000;