updated nginx

This commit is contained in:
2026-03-11 11:28:41 +00:00
parent 8ec208c608
commit e6402beea4

21
nginx.conf Normal file
View File

@@ -0,0 +1,21 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# Handle React/Vite SPA routing
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# Disable caching for index.html
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
}