Files
2026-03-11 11:28:41 +00:00

21 lines
499 B
Nginx Configuration File

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";
}
}