up
This commit is contained in:
@@ -5,6 +5,11 @@ server {
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
# 🚫 CACHE DESACTIVADO GLOBALMENTE
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
|
||||
add_header Pragma "no-cache" always;
|
||||
add_header Expires "0" always;
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
@@ -79,10 +84,12 @@ server {
|
||||
access_log off;
|
||||
}
|
||||
|
||||
# Static assets caching
|
||||
# Static assets - SIN CACHE para desarrollo
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
# CACHE DESACTIVADO
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
|
||||
add_header Pragma "no-cache" always;
|
||||
expires off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
@@ -105,10 +112,12 @@ server {
|
||||
alias /var/www/html/uploads/;
|
||||
autoindex off;
|
||||
|
||||
# Security: solo permitir ciertos tipos de archivo
|
||||
# Security: solo permitir ciertos tipos de archivo - SIN CACHE
|
||||
location ~* \.(jpg|jpeg|png|gif|pdf|doc|docx|xls|xlsx|mp4|mp3|webp)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
# CACHE DESACTIVADO
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
|
||||
add_header Pragma "no-cache" always;
|
||||
expires off;
|
||||
}
|
||||
|
||||
# Denegar ejecución de PHP en uploads
|
||||
|
||||
Reference in New Issue
Block a user