Skip to content

Commit

Permalink
Merge pull request #818 from uselagoon/drupal-nginx-json
Browse files Browse the repository at this point in the history
Port the latest changes from Drupals htaccess blocks to Nginx rules
  • Loading branch information
tobybellwood authored Sep 19, 2023
2 parents 654eed2 + 2a02bcb commit 0c6cd46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions images/nginx-drupal/drupal.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Nginx configuration for Drupal 7 and 8.
### Nginx configuration for Drupal.
server {
include /etc/nginx/conf.d/drupal/server_prepend*.conf;

Expand Down Expand Up @@ -36,7 +36,7 @@ server {
## Replicate the Apache <FilesMatch> directive of Drupal standard
## .htaccess. Disable access to any code files. Return a 404 to curtail
## information disclosure.
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|.*sql\.gz|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^\/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|web\.config)$|composer\.(json|lock)$|^\/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
location ~* \.(engine|inc|install|make|module|profile|po|sh|.*sql|.*sql\.gz|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^\/(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template)$|(composer\.(json|lock)|web\.config|yarn\.lock|package(-lock)?\.json)$|^\/#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$ {
deny all;
access_log off;
log_not_found off;
Expand Down

0 comments on commit 0c6cd46

Please sign in to comment.