fix: prepare frontend production exports

This commit is contained in:
ANG-Server
2026-07-20 21:07:27 +08:00
parent 435c578dde
commit 0bab768b14
8 changed files with 158 additions and 8 deletions

View File

@@ -0,0 +1,35 @@
server {
listen 80;
server_name whaletown.xinghangee.icu;
root /var/www/whale-town-front-v2/build/web;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Control "no-cache";
}
location ~* \.wasm$ {
default_type application/wasm;
expires 5m;
add_header Cache-Control "public, max-age=300";
try_files $uri =404;
}
location ~* \.pck$ {
default_type application/octet-stream;
expires 5m;
add_header Cache-Control "public, max-age=300";
try_files $uri =404;
}
location ~* \.(?:js|png|ico)$ {
expires 5m;
add_header Cache-Control "public, max-age=300";
try_files $uri =404;
}
}