Skip to content

Commit

Permalink
Merge pull request #962 from dacook/block-php-requests
Browse files Browse the repository at this point in the history
Block requests for .php
  • Loading branch information
mkllnk authored Nov 21, 2024
2 parents 3a50ff3 + cb4485d commit eec96a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions inventory/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ nginx_sites:
brotli_types text/css text/javascript text/plain application/javascript application/x-javascript application/json;
try_files $uri/index.html $uri @rails;
# Block scanning for scripts efficiently.
location ~ \.php(\?.*)?$ {
return 404;
}
location @rails {
{{ nginx_valid_methods }}
Expand Down

0 comments on commit eec96a8

Please sign in to comment.