You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/07/05 15:13:16 UTC
[sling-site] branch master updated: Prevent git folder from being
accessed
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new a5bcead Prevent git folder from being accessed
a5bcead is described below
commit a5bcead600d940b8007e10417c3433c7dd92a5a5
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon Jul 5 18:12:49 2021 +0300
Prevent git folder from being accessed
Now make the change in the correct location.
---
src/main/jbake/assets/.htaccess | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/jbake/assets/.htaccess b/src/main/jbake/assets/.htaccess
index 3c6adb4..6a43b9e 100644
--- a/src/main/jbake/assets/.htaccess
+++ b/src/main/jbake/assets/.htaccess
@@ -24,6 +24,9 @@ AddDefaultCharset utf-8
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
+# Prevent git folder from being downloaded
+RedirectMatch 404 /\.git
+
# Redirects for various historical pages
Redirect Permanent /downloads.html /downloads.cgi
Redirect Permanent /media.html /