Updated nginx conf
All checks were successful
Publish new notes / build-quartz (push) Successful in 1m36s
Publish new notes / deploy (push) Successful in 23s

This commit is contained in:
Vlad 2025-06-23 12:20:19 +01:00
parent 78a5a2b180
commit a12aec37b9

View File

@ -150,17 +150,33 @@ data:
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; '"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main; access_log /var/log/nginx/access.log main;
limit_req_zone $binary_remote_addr zone=req_limit_per_ip:1m rate=1r/s;
server { server {
listen 80; listen 80;
server_name vlads-notes.jumpingcrab.com; server_name vlads-notes.jumpingcrab.com;
root /www/data; root /www/data;
index index.html; index index.html;
error_page 404 /404.html; error_page 404 /404.html;
server_tokens off;
include mime.types; include mime.types;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options DENY;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "no-referrer-when-downgrade";
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location / { location / {
limit_req zone=req_limit_per_ip burst=5 nodelay;
try_files $uri $uri.html $uri/ =404; try_files $uri $uri.html $uri/ =404;
} }
} }