Skip to content

Commit

Permalink
Deny web server access to .bak files
Browse files Browse the repository at this point in the history
  • Loading branch information
mapkyca committed Sep 11, 2018
1 parent cd15225 commit 272c3bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .htaccess
Expand Up @@ -62,6 +62,10 @@
Order allow,deny
Deny from all
</Files>
<Files ~ "\.bak$">
Order allow,deny
Deny from all
</Files>
<Files ~ "sitemap\.xml">
Order allow,deny
Allow from all
Expand Down
3 changes: 3 additions & 0 deletions warmup/webserver-configs/htaccess-2.4.dist
Expand Up @@ -52,6 +52,9 @@
<Files ~ "\.xml$">
Require all denied
</Files>
<Files ~ "\.bak$">
Require all denied
</Files>
<Files ~ "sitemap\.xml">
Require all granted
</Files>
Expand Down
4 changes: 4 additions & 0 deletions warmup/webserver-configs/htaccess.dist
Expand Up @@ -62,6 +62,10 @@
Order allow,deny
Deny from all
</Files>
<Files ~ "\.bak$">
Order allow,deny
Deny from all
</Files>
<Files ~ "sitemap\.xml">
Order allow,deny
Allow from all
Expand Down
2 changes: 1 addition & 1 deletion warmup/webserver-configs/nginx.conf
Expand Up @@ -83,7 +83,7 @@ http {
deny all;
}

location ~* \.(xml|ini|json|lock)$ {
location ~* \.(xml|ini|json|lock|bak)$ {
deny all;
}

Expand Down

0 comments on commit 272c3bc

Please sign in to comment.