Skip to content

Commit

Permalink
Merge pull request #991 from uselagoon/924-private-files-block-txt-md
Browse files Browse the repository at this point in the history
fix: don't block txt/md in Drupal private filesystem
  • Loading branch information
tobybellwood committed May 15, 2024
2 parents df27ade + cf1d1b7 commit 5a92030
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions images/nginx-drupal/drupal.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ server {
try_files $uri @drupal;
}

## Do not allow access to .txt and .md unless inside sites/*/files/
location ~* ^(?!.+sites\/.+\/files\/).+\.(txt|md)$ {
## Do not allow access to .txt and .md unless inside public or private files
## directories (sites/*/files and sytem/files)
location ~* ^(?!.+(?:sites\/.+|system)\/files\/).+\.(txt|md)$ {
deny all;
access_log off;
log_not_found off;
Expand Down

0 comments on commit 5a92030

Please sign in to comment.