From c38f3cfef74b25c3bd1a2788524162951a63d620 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:37:06 +0100 Subject: [PATCH] Fix manifest & healthcheck css paths (again) --- app/Http/Controllers/SinglePageController.php | 2 ++ resources/views/health.blade.php | 2 +- resources/views/landing.blade.php | 2 +- routes/web.php | 4 +++- 4 files changed, 7 insertions(+), 3 deletions(-) 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 () {