How to force Laravel Inertia to https? And pass HSTS
I have a problem with my Laravel 9, Inertia.Js project and my cpanel hosting. The devOps say its have HSTS and should access with https, i have already setting force https on cpanel setting, but its still not work.
I have already set my APP_ENV to production and APP_URL using https.
Maybe there is special middleware and tutorial to force laravel inertia https?
// File: AppServiceProvider.php
use Illuminate\Support\Facades\App;
public function boot()
{
if (App::environment('production')) {
\URL::forceScheme('https');
}
}
@Niush i have tried sir, but still not work. Our dev ops say, they use HSTS protocol, so this need force to https. But i have tried, and still 419 error