nzambello.dev/nginx/nginx.conf
Nicola Zambello 86bfb736f2
All checks were successful
Docker CI / release (push) Successful in 2m57s
fix: remove csp
2025-08-12 15:56:58 +03:00

37 lines
1 KiB
Nginx Configuration File

worker_processes 1;
events {
worker_connections 1024;
}
http {
# Security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
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 X-XSS-Protection "1; mode=block" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always;
# Remove server information
server_tokens off;
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
location / {
try_files $uri $uri/index.html $uri.html;
}
}
}