diff --git a/app/Http/Controllers/SinglePageController.php b/app/Http/Controllers/SinglePageController.php index a5b92094..ef2c9b69 100644 --- a/app/Http/Controllers/SinglePageController.php +++ b/app/Http/Controllers/SinglePageController.php @@ -34,6 +34,7 @@ public function index() $ssoDocUrl = config('2fauth.ssoDocUrl'); $exportSchemaUrl = config('2fauth.exportSchemaUrl'); $cspNonce = Vite::cspNonce(); + $isSecure = str_starts_with(config('app.url'), 'https'); // if (Auth::user()->preferences) @@ -60,6 +61,7 @@ public function index() 'lang' => $lang, 'locales' => $locales, 'cspNonce' => $cspNonce, + 'isSecure' => $isSecure, ]); } } diff --git a/resources/views/health.blade.php b/resources/views/health.blade.php index d081aa89..c6e256f3 100644 --- a/resources/views/health.blade.php +++ b/resources/views/health.blade.php @@ -5,7 +5,7 @@ {{ config('app.name', 'Laravel') }} - +
diff --git a/resources/views/landing.blade.php b/resources/views/landing.blade.php index 62a64441..b3389e68 100644 --- a/resources/views/landing.blade.php +++ b/resources/views/landing.blade.php @@ -15,7 +15,7 @@ - + diff --git a/routes/web.php b/routes/web.php index c620427a..8686208a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -106,7 +106,9 @@ CustomCreateFreshApiToken::class, ])->get('/up', function () { //Event::dispatch(new DiagnosingHealth); - return view('health'); + return view('health', [ + 'isSecure' => str_starts_with(config('app.url'), 'https'), + ]); }); // Route::get('/notification', function () {