Skip to content

Commit

Permalink
fix: don't block txt/md in Drupal private filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketeerbkw committed Apr 30, 2024
1 parent 1068b8d commit cf1d1b7
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 cf1d1b7

Please sign in to comment.