Add configuration to block access to hidden files in nginx
This commit is contained in:
parent
c22dd91556
commit
1984e64ccd
5 changed files with 42 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue