Files
Mercados-Web/frontend/frontend.nginx.conf

31 lines
869 B
Plaintext
Raw Normal View History

2025-07-04 15:56:42 -03:00
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
2025-09-10 15:21:29 -03:00
# --- BLOQUE PARA BOOTSTRAP.JS (MEJORADO) ---
# Se aplica EXCLUSIVAMENTE a la petición de /bootstrap.js
2025-09-10 14:30:45 -03:00
location = /bootstrap.js {
2025-09-10 15:21:29 -03:00
# Aseguramos que Nginx genere la huella digital ETag
etag on;
2025-09-10 14:30:45 -03:00
2025-09-10 15:21:29 -03:00
# Instrucciones explícitas de no cachear
expires -1;
add_header Cache-Control "no-cache, must-revalidate, private";
2025-09-10 14:30:45 -03:00
try_files $uri =404;
2025-07-04 15:56:42 -03:00
}
2025-09-10 15:21:29 -03:00
# Bloque para otros activos con hash (con caché agresiva)
2025-09-10 14:30:45 -03:00
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
2025-07-04 15:56:42 -03:00
expires 1y;
add_header Cache-Control "public";
2025-09-10 14:30:45 -03:00
try_files $uri =404;
}
2025-09-10 15:21:29 -03:00
# Bloque para el enrutamiento de la aplicación React
2025-09-10 14:30:45 -03:00
location / {
try_files $uri $uri/ /index.html;
2025-07-04 15:56:42 -03:00
}
}