Skip to content

Commit

Permalink
Nginx drupal rule for protect files and directories was missing leadi…
Browse files Browse the repository at this point in the history
…ng slash for path. (#228)

Co-authored-by: Nigel Banks <[email protected]:w>
  • Loading branch information
nigelgbanks and Nigel Banks authored Jun 17, 2022
1 parent cc4b87c commit 9dcbac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drupal/rootfs/etc/nginx/shared/drupal.defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ location ~ /vendor/.*\.php$ {
}

# Protect files and directories from prying eyes.
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
deny all;
return 404;
}
Expand Down

0 comments on commit 9dcbac9

Please sign in to comment.