fix: harden backend production deployment

This commit is contained in:
ANG-Server
2026-07-20 21:07:27 +08:00
parent c995891c1f
commit a72920d1e0
6 changed files with 57 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
server {
listen 80;
server_name whaletownadmin.xinghangee.icu;
root /var/www/whale-town-end-v2/client/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Control "no-cache";
}
location ~* \.(?:js|css|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable";
try_files $uri =404;
}
}