From 18439c40d724680d9764015a257bac911c1c2f9b Mon Sep 17 00:00:00 2001 From: dmolinari Date: Wed, 3 Sep 2025 14:21:31 -0300 Subject: [PATCH] Fix 1421 --- Elecciones-Web/frontend/frontend.nginx.conf | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Elecciones-Web/frontend/frontend.nginx.conf b/Elecciones-Web/frontend/frontend.nginx.conf index d1f6335..a8d7186 100644 --- a/Elecciones-Web/frontend/frontend.nginx.conf +++ b/Elecciones-Web/frontend/frontend.nginx.conf @@ -1,4 +1,4 @@ -# frontend-admin/frontend.nginx.conf +# frontend/frontend.nginx.conf (Y también en frontend-admin) server { listen 80; @@ -7,12 +7,17 @@ server { root /usr/share/nginx/html; index index.html; + # 1. Manejo explícito para el manifest.json + # El '=' hace que sea una coincidencia exacta y de alta prioridad. + location = /manifest.json { + # Evita que el navegador guarde en caché el manifest, que puede cambiar con cada build. + add_header 'Cache-Control' 'no-cache, no-store, must-revalidate'; + # Intenta servir el archivo. Si no existe, devuelve un 404 real. + try_files $uri =404; + } + + # 2. Manejo de todas las demás rutas para la SPA location / { try_files $uri $uri/ /index.html; } - - location ~* \.(?:css|js|jpg|jpeg|gif|png|ico|svg|woff|woff2)$ { - expires 1y; - add_header Cache-Control "public"; - } } \ No newline at end of file