From a28e6fbcbfc8feccdcba200c2421f5c42a78d97a Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Sat, 10 Jan 2026 22:33:36 +0100 Subject: Docker --- frontend/nginx.conf | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 frontend/nginx.conf (limited to 'frontend/nginx.conf') 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 -- cgit v1.2.3