add https

This commit is contained in:
Bayu Lukman Yusuf 2026-02-23 08:58:46 +07:00
parent 7baffc9cb5
commit a733b90d46
1 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,8 @@ namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
/**
@ -20,5 +22,12 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
//
if (
request()->isSecure() ||
request()->server('HTTP_X_FORWARDED_PROTO') === 'https'
) {
URL::forceScheme('https');
}
}
}