commit 5a0762720f111622ab848413d9defc4092df83b3 parent 2ab8c23b2f17aaa103f8ee856ae48056382a4cf3 Author: JayVii <jayvii[AT]posteo[DOT]de> Date: Fri, 10 May 2024 18:33:56 +0200 Ensure HTML is provided as UTF-8 Diffstat:
M | .htaccess | | | 25 | ++++++++++++------------- |
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/.htaccess b/.htaccess @@ -1,25 +1,24 @@ # SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de> -# Set 404 Document -ErrorDocument 404 /404.html -ErrorDocument 403 /404.html - # Disallow file browsing Options -Indexes +# Ensure content is loaded as UTF-8 +IndexOptions +Charset=UTF-8 + # Disallow browsing of certain sub-directories (redirect to 404) RedirectMatch 404 ^/.git/.*$ RedirectMatch 404 ^/.ssh/.*$ RedirectMatch 404 ^/.config/.*$ RedirectMatch 404 ^/.local/.*$ RedirectMatch 404 ^/.cache/.*$ -RedirectMatch 404 ^/bin/.*$ -RedirectMatch 404 ^/url$ -RedirectMatch 404 ^/.bash_history$ - -# Style filebrowser -IndexStyleSheet /assets/index.css +RedirectMatch 404 ^/yt.R$ +RedirectMatch 404 ^/template.html$ +RedirectMatch 404 ^/url.csv$ -# Workaround: new directory for private repos -RewriteRule ^priv/(.*)$ /prv/$1 [R=301,L] -\ No newline at end of file +# Private Area +AuthType Basic +AuthName "Private Area! You need a password to access this." +AuthUserFile /etc/apache2/.htpassword +Require valid-user +\ No newline at end of file