Skip to content

Commit

Permalink
Forces HTTPS if APP_URL is https
Browse files Browse the repository at this point in the history
Bugfix for OAuth redirect_url not being http. This is due to an upstream proxy issue with kubernetes/kubernetes#66607
  • Loading branch information
Miniland1333 committed May 2, 2021
1 parent c7f49e2 commit ca0cc4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public function boot()
if ($this->app->runningUnitTests()) {
Schema::defaultStringLength(191);
}

if (substr( env('APP_URL'), 0, 8 ) === "https://") {
\Illuminate\Support\Facades\URL::forceScheme('https');
}

$this->bootLibretextsSocialite();
/* \DB::listen(function ($query) {
\Log::debug($query->sql);
Expand Down

0 comments on commit ca0cc4d

Please sign in to comment.