30 lines
846 B
Plaintext
30 lines
846 B
Plaintext
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# --- BLOQUE PARA BOOTSTRAP.JS (MEJORADO) ---
|
|
location = /bootstrap.js {
|
|
# 1. Aseguramos que Nginx genere la huella digital ETag.
|
|
etag on;
|
|
|
|
# 2. Instrucciones explícitas de no cachear.
|
|
expires -1; # Equivalente a 'off', pero a veces más fuerte.
|
|
add_header Cache-Control "no-cache, must-revalidate, private";
|
|
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Bloque para activos con hash (sin cambios, ya es correcto)
|
|
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Bloque para la SPA (sin cambios)
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
} |