commit 786f6e8ecfba77bc7e6406a529d35fb6aaa8e35f parent cc79d4490682aaf58b85f6a4615e80ae5ce0c460 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Sat, 26 Oct 2024 14:04:30 +0200 fix: ensure permissions are safe Diffstat:
A | .htaccess | | | 20 | ++++++++++++++++++++ |
1 file changed, 20 insertions(+), 0 deletions(-)
diff --git a/.htaccess b/.htaccess @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: 2024 JayVii <jayvii-serci[AT]posteo[DOT]de> + +# Set 404 Document +ErrorDocument 404 /404.html + +# Disallow file browsing +Options -Indexes + +# Disallow browsing of certain sub-directories (redirect to 404) +RedirectMatch 404 ^/data/.*$ +RedirectMatch 404 ^/config/.*$ +RedirectMatch 404 ^/lib/.*$ +RedirectMatch 404 ^/LICENSES/.*$ +RedirectMatch 404 ^/.reuse/.*$ +RedirectMatch 404 ^/.git/.*$ +RedirectMatch 404 ^/.gitignore$ +RedirectMatch 404 ^/.htaccess$ +RedirectMatch 404 ^/README.md$ +