Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/fresh-install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ jobs:
DB_DATABASE: testing_db
DB_USERNAME: root
DB_PASSWORD: secret
run: php artisan migrate --seed && php artisan test
OPENKAB_DB_DATABASE: testing_gabungan_db
OPENKAB_DB_USERNAME: root
OPENKAB_DB_PASSWORD: secret
run: php artisan key:generate && php artisan migrate --seed && php artisan test
18 changes: 18 additions & 0 deletions public/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

RewriteEngine On

# Block access to dotfiles (including .env)
RewriteCond %{REQUEST_URI} ^/\.env [NC]
RewriteRule ^ - [R=404,L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Expand All @@ -29,3 +33,17 @@
Order Allow,Deny
Allow from all
</Files>

# Block direct access to .env and other dotfiles
<FilesMatch "^\.env">
Require all denied
</FilesMatch>

# Fallback for Apache 2.2
<IfModule !mod_authz_core.c>
<FilesMatch "^\.env">
order allow,deny
deny from all
Satisfy All
</FilesMatch>
</IfModule>
Loading