chu-iptv/deploy/nginx/default.conf

24 lines
643 B
Text

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Désactiver le cache pour les fichiers HTML (éviter les problèmes de version)
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Cache court pour les assets statiques
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
expires 1h;
add_header Cache-Control "public, max-age=3600";
}
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
}