Skip to content

Commit

Permalink
Merge pull request #654 from uselagoon/drupal_securitytxt
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Jan 20, 2023
2 parents d86ed4f + 9d0889e commit d03c9b5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions images/nginx-drupal/drupal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ server {
location / {
include /etc/nginx/conf.d/drupal/location_prepend*.conf;

## This has to come before any *.txt path-based blocking
## Support for the securitytxt module
## http://drupal.org/project/securitytxt.
## RFC8615 standard path.
location ~* /\.well-known/security\.txt(\.sig)?$ {
access_log off;
try_files $uri @drupal;
}

## Do not allow access to .txt and .md unless inside sites/*/files/
location ~* ^(?!.+sites\/.+\/files\/).+\.(txt|md)$ {
deny all;
Expand Down Expand Up @@ -121,14 +130,6 @@ server {
log_not_found off;
}

## Support for the securitytxt module
## http://drupal.org/project/securitytxt.
## RFC8615 standard path.
location ~* ^/\.well-known/security\.txt(\.sig)?$ {
access_log off;
try_files $uri @drupal;
}

## Support for the robotstxt module
## http://drupal.org/project/robotstxt.
location = /robots.txt {
Expand Down

0 comments on commit d03c9b5

Please sign in to comment.