app->environment('production')) { \Illuminate\Support\Facades\URL::forceScheme('https'); } Gate::define('viewApiDocs', function ($user = null) { return true; }); Scramble::configure() ->routes(function (Route $route) { return Str::startsWith($route->uri, 'api/'); }) ->withDocumentTransformers(function (OpenApi $openApi) { $openApi->secure( SecurityScheme::http('bearer') ); }); } }