This commit is contained in:
juneix
2026-03-07 13:01:39 +08:00
parent f0b921d603
commit 0ae9155c2f
22 changed files with 5731 additions and 1608 deletions
+33
View File
@@ -0,0 +1,33 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# MIME types
types {
text/html html htm;
application/json json;
application/manifest+json webmanifest;
text/javascript js;
image/webp webp;
image/png png;
}
# Service Worker: No caching
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
}
# Static assets: Long-term cache
location ~* \.(png|webp|ico)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
# SPA/PWA routing support
location / {
try_files $uri $uri/ /index.html;
}
}