Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -170,6 +170,13 @@ server {
}
{% endblock %}

{% block plugin_theme_docs_files -%}
# Block .txt and .md files in plugins, mu-plugins, and themes directories to prevent version disclosure
location ~* /app/(plugins|mu-plugins|themes)/.+\.(txt|md)$ {
deny all;
}
{% endblock %}

{% block location_primary -%}
location / {
try_files $uri $uri/ /index.php?$args;
Expand Down