- Disable source maps in production builds (vite.config.ts: sourcemap: false) - Add vite-plugin-obfuscator for JS obfuscation (hex identifiers, base64 string encoding) - Move OIDC config behind VITE_* env vars with dev fallbacks (auth/config.ts) - Add server_tokens off to nginx.conf to stop advertising nginx version - Add type declaration for vite-plugin-obfuscator
24 lines
639 B
Nginx Configuration File
24 lines
639 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
server_tokens off;
|
|
|
|
# Root directory for static files (must match Docker COPY path)
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Serve static files
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Enable gzip compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
# Cache static assets
|
|
# location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ {
|
|
# expires 1y;
|
|
# add_header Cache-Control "public, immutable";
|
|
# }
|
|
}
|