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
29 changes: 19 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
APP_NAME=OpenKab
APP_ENV=development
APP_KEY=base64:4J2thsoUyMyPvi0K7KNlqj4aiKCnyUisCcqZswPkAwI=
APP_KEY=
APP_DEBUG=false
APP_URL=http://devopenkab.opendesa.id/
APP_URL=http://localhost/

# SECURITY NOTE:
# - Jangan commit file .env ke repository (sudah ada di .gitignore)
# - Ganti semua credential default sebelum deploy production
# - File ini hanya untuk referensi dan testing, bukan untuk production

LOG_CHANNEL=daily
LOG_DEPRECATIONS_CHANNEL=null
Expand All @@ -12,18 +17,22 @@ LOG_LEVEL=debug
DB_CONNECTION=mysql

# database utama aplikasi OpenKab
# Default values untuk testing (GitHub Actions)
# PENTING: Ganti dengan credential yang aman untuk production!
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=testing_db
DB_USERNAME=root
DB_PASSWORD=secret
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=

# database kedua, opensid database gabungan
# Default values untuk testing (GitHub Actions)
# PENTING: Ganti dengan credential yang aman untuk production!
OPENKAB_DB_HOST=127.0.0.1
OPENKAB_DB_PORT=3306
OPENKAB_DB_DATABASE=testing_gabungan_db
OPENKAB_DB_USERNAME=root
OPENKAB_DB_PASSWORD=secret
OPENKAB_DB_DATABASE=
OPENKAB_DB_USERNAME=
OPENKAB_DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
Expand Down Expand Up @@ -100,8 +109,8 @@ OTP_RESEND_MAX_ATTEMPTS=2
OTP_RESEND_DECAY_SECONDS=30

# Telegram Bot Configuration
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
TELEGRAM_BOT_NAME=@your_bot_username_here
TELEGRAM_BOT_TOKEN=
TELEGRAM_BOT_NAME=

# Global Rate Limiter Configuration
RATE_LIMITER_ENABLED=false
Expand Down
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
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ jobs:
DB_DATABASE: testing_db
DB_USERNAME: root
DB_PASSWORD: secret
OPENKAB_DB_DATABASE: testing_gabungan_db
OPENKAB_DB_USERNAME: root
OPENKAB_DB_PASSWORD: secret

run: php artisan migrate && php artisan test
run: php artisan key:generate && php artisan migrate && 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