Explorar o código

Merge pull request #3710 from thisislawatts/fix/opt-out-of-forcing-https

fix: add opt of forceScheme(https)
daniel %!s(int64=2) %!d(string=hai) anos
pai
achega
f776c79284
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      app/Providers/AppServiceProvider.php

+ 3 - 1
app/Providers/AppServiceProvider.php

@@ -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);