diff options
| author | Arne Rief <riearn@proton.me> | 2026-01-10 22:33:36 +0100 |
|---|---|---|
| committer | Arne Rief <riearn@proton.me> | 2026-01-10 22:33:36 +0100 |
| commit | a28e6fbcbfc8feccdcba200c2421f5c42a78d97a (patch) | |
| tree | f35c6be871ca421ee67f3b615f50d640071aa9d5 /frontend/nginx.conf | |
| parent | e836e7dd4ed5e9fa60e949d159100040b22a8f48 (diff) | |
Docker
Diffstat (limited to 'frontend/nginx.conf')
| -rw-r--r-- | frontend/nginx.conf | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/frontend/nginx.conf b/frontend/nginx.conf new file mode 100644 index 0000000..151afe8 --- /dev/null +++ b/frontend/nginx.conf @@ -0,0 +1,27 @@ +# For Docker Compose +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index 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; + + # SPA routing - send all requests to index.html + location / { + try_files $uri $uri/ /index.html; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } + + # Security headers + add_header X-Frame-Options "SAMEORIGIN" always; + add_header X-Content-Type-Options "nosniff" always; + add_header X-XSS-Protection "1; mode=block" always; +}
\ No newline at end of file |
