Skip to content

Commit

Permalink
Merge pull request #1075 from Log1x/patch-1
Browse files Browse the repository at this point in the history
Prevent direct access for .blade.php files
  • Loading branch information
retlehs authored Apr 30, 2019
2 parents 0193cfa + 978d46f commit 9c50dbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions roles/wordpress-setup/templates/wordpress-site.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ server {
deny all;
}
{% endblock %}

{% block blade_twig_templates -%}
# Prevent Blade and Twig templates from being accessed directly.
location ~* \.(blade\.php|twig)$ {
deny all;
}
{% endblock %}

{% block location_primary -%}
location / {
Expand Down

0 comments on commit 9c50dbc

Please sign in to comment.