fix: force HTTPS di production untuk Railway

This commit is contained in:
Adamalfantino 2026-05-22 23:38:42 +07:00
parent 797e55e8c9
commit d4727bb2d3
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
@ -19,6 +20,9 @@ public function register(): void
*/
public function boot(): void
{
//
// Force HTTPS di production (Railway pakai reverse proxy)
if (config('app.env') === 'production') {
URL::forceScheme('https');
}
}
}