19 lines
472 B
Nginx Configuration File
19 lines
472 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Serve static assets with long cache
|
|
location ~* \.(js|css|png|jpg|svg|ico|woff2?)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# SPA fallback: return index.html for any path
|
|
# React Router (with basename=/networkview) handles routing client-side
|
|
location / {
|
|
try_files $uri /index.html;
|
|
}
|
|
}
|