Improve security

Blocking access to system files on URL level regardless of file permissions
This commit is contained in:
Julian Prieber 2025-03-30 22:40:28 +02:00 committed by GitHub
parent 96521b8027
commit f20b3d4a43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,4 +32,21 @@ Deny from all
<Files ~ "\.zip$">
Order allow,deny
Deny from all
</Files>
</Files>
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Block access to .env files
RewriteRule ^.*\.env$ - [F,L]
# Block access to SQLite database files
RewriteRule ^.*\.sqlite$ - [F,L]
# Block access to ZIP files
RewriteRule ^.*\.zip$ - [F,L]
</IfModule>