Vite/React 19 console and enterprise PWA. Officer console screens, offline ledger and sync, data feeds and trip-wire rules screens with freshness chip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
27 lines
669 B
Nginx Configuration File
27 lines
669 B
Nginx Configuration File
server {
|
|
listen 5173;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
|
|
gzip_min_length 1024;
|
|
|
|
# Immutable fingerprinted assets
|
|
location /assets/ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# The service worker must never be cached, or the PWA can never update
|
|
location = /sw.js {
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
}
|
|
|
|
# SPA fallback — React Router owns the paths
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|