Add configuration to block access to hidden files in nginx

This commit is contained in:
Jennie Robinson Faber 2026-03-31 17:50:00 +01:00
parent c22dd91556
commit 1984e64ccd
5 changed files with 42 additions and 0 deletions

View file

@ -47,6 +47,12 @@ http {
add_header Cache-Control "public";
}
# Block access to hidden files (especially .git)
location ~ /\. {
deny all;
return 404;
}
# Health check
location = /api/health {
proxy_pass http://outline;