84b07e33e7
- nginx and mysql images pinned to SHA256 digests - nginx: return 405 on TRACE requests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_tokens off;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/javascript;
|
|
gzip_min_length 1024;
|
|
gzip_vary on;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self';" always;
|
|
|
|
if ($request_method = TRACE) {
|
|
return 405;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://backend:8000;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
}
|