From 319a04e29e40dad512ce3c44ad59d8143e1272b6 Mon Sep 17 00:00:00 2001 From: James Montalvo Date: Fri, 19 Oct 2018 22:44:27 -0500 Subject: [PATCH] Protect .git directories from http viewing --- src/roles/htdocs/templates/.htaccess.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/roles/htdocs/templates/.htaccess.j2 b/src/roles/htdocs/templates/.htaccess.j2 index fcebf0db0..fc23504b3 100644 --- a/src/roles/htdocs/templates/.htaccess.j2 +++ b/src/roles/htdocs/templates/.htaccess.j2 @@ -4,6 +4,9 @@ # Enable mod_rewrite engine RewriteEngine on + # deny access to git repository info + RewriteRule "^(.*/)?\.git/" - [F,L] + RewriteBase / # This is needed for Links inside MS Office documents to resolve properly