Skip to content

Commit

Permalink
Merge pull request #3710 from thisislawatts/fix/opt-out-of-forcing-https
Browse files Browse the repository at this point in the history
fix: add opt of forceScheme(https)
  • Loading branch information
dansup committed Dec 2, 2022
2 parents c1dc3ec + d1dca5a commit f776c79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot()
{
URL::forceScheme('https');
if (preg_match("/^https/", env('APP_URL')) || env('APP_ENV') === 'production') {
URL::forceScheme('https');
}
Schema::defaultStringLength(191);
Paginator::useBootstrap();
Avatar::observe(AvatarObserver::class);
Expand Down

0 comments on commit f776c79

Please sign in to comment.