secure nginx

This commit is contained in:
Mateusz Gruszczyński
2026-04-08 07:22:08 +02:00
parent 693b0a13cd
commit 28164f5647

View File

@@ -5,14 +5,9 @@ map $uri $static_file {
server {
listen 80 default_server;
server_name ${SERVER_NAME};
server_tokens off;
etag off;
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml;
gzip_min_length 1024;
client_max_body_size 100M;
proxy_http_version 1.1;
@@ -44,6 +39,10 @@ server {
location / {
proxy_pass http://web:80/;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
if ($static_file) {
add_header Cache-Control "public, max-age=31536000, immutable" always;
}