Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 98b133a

Browse files
authored
Merge pull request #23 from ibnsultan/patch-1
🔐 Security Fix: Prevent direct access to .env file
2 parents 52cf078 + cc1c882 commit 98b133a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
RewriteEngine On
77

8+
# prevent http access to .env
9+
<Files ".env">
10+
Order Allow,Deny
11+
Deny from all
12+
</Files>
13+
814
# Handle Authorization Header
915
RewriteCond %{HTTP:Authorization} .
1016
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

0 commit comments

Comments
 (0)