소스 검색

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

fix: add opt of forceScheme(https)
daniel 2 년 전
부모
커밋
f776c79284
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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);