ordinarthur-os/apps/pwa/nginx.conf
ordinarthur bc0c15873f init
2026-04-15 16:41:19 +02:00

26 lines
523 B
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Service worker : jamais en cache long
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
location = /manifest.webmanifest {
add_header Cache-Control "no-cache";
}
# SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
# Assets immuables (Vite hash dans le nom)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}