From a2f20fc18f4e47625dee428ff03c857c6dbef431 Mon Sep 17 00:00:00 2001 From: Kode Date: Sun, 30 Sep 2018 11:45:08 +0100 Subject: [PATCH] allow forcing https for reverse proxy use --- .env | 2 ++ app/Providers/AppServiceProvider.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/.env b/.env index 2bcd4d068..676a3b2cf 100644 --- a/.env +++ b/.env @@ -29,3 +29,5 @@ PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= PUSHER_APP_CLUSTER=mt1 + +FORCE_HTTPS=true \ No newline at end of file diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index c779143ec..e9a866a14 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -54,6 +54,12 @@ public function boot() } view()->share('alt_bg', $alt_bg); + var_dump(env('FORCE_HTTPS')); + + if (env('FORCE_HTTPS') === true) { + \URL::forceScheme('https'); + } + } /**