nextapps-be / laravel-swagger-ui

Add Swagger UI to a Laravel application.
MIT License
49 stars 17 forks source link

Failed to load API definition on https #31

Open futurfuturfuturfutur opened 3 months ago

futurfuturfuturfutur commented 3 months ago

It works on local with http, but failed on stage environment with https Снимок экрана 2024-03-28 110103

KarimpourMehrab commented 2 months ago

when i added the current meta tag is error fixed ! in : resources/views/index.blade.php <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

popovdk commented 3 weeks ago

Set up forceScheme for env with https

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        if($this->app->environment('production')) {
            \URL::forceScheme('https');
        }
    }
}