rideaware-ui/nginx.conf
2025-09-14 20:50:05 -05:00

49 lines
No EOL
1.3 KiB
Nginx Configuration File

events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
etag on;
gzip on;
gzip_comp_level 5;
gzip_min_length 1024;
gzip_types
text/plain text/css application/json application/javascript
text/xml application/xml application/xml+rss image/svg+xml;
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
# Handle client-side routing
location / {
try_files $uri $uri/ /index.html;
}
location = /index.html {
add_header Cache-Contrl "no-store, no-cache, must-revalidate";
expires -1;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
location = healthz {
default_type text/plain;
return 200 'ok';
}
}
}