Merge pull request #3259 from kaspernowak/patch-1

feat: add OpenLiteSpeed rewrite rule for protected files
This commit is contained in:
Cüneyt Şentürk 2025-03-29 03:09:40 +03:00 committed by GitHub
commit febb4ede9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,10 @@
</IfModule>
</FilesMatch>
# Prevent Direct Access to Protected Files (OpenLiteSpeed syntax)
RewriteCond %{REQUEST_URI} (^|/)(\.env|\.log|artisan)$ [NC]
RewriteRule .* - [F,L]
# Prevent Direct Access To Protected Folders
RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301]