Fix manifest & healthcheck css paths (again)

This commit is contained in:
Bubka 2024-11-27 14:37:06 +01:00
parent 5bca296cfa
commit c38f3cfef7
4 changed files with 7 additions and 3 deletions

View File

@ -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,
]);
}
}

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ config('app.name', 'Laravel') }}</title>
<!-- Styles -->
<link rel="stylesheet" href="{{ url('healthcheck.css') }}"></link>
<link rel="stylesheet" href="{{ url('healthcheck.css', [], $isSecure) }}"></link>
</head>
<body class="antialiased">
<div class="relative sm:flex sm:justify-center sm:items-center min-h-screen bg-gray-100 selection:bg-red-500 selection:text-white">

View File

@ -15,7 +15,7 @@
<link rel="icon" type="image/png" href="{{ asset('favicon.png') }}" />
<link rel="apple-touch-icon" href="{{ asset('favicon_lg.png') }}" />
<link rel="apple-touch-icon-precomposed" href="{{ asset('favicon_lg.png') }}" />
<link rel="manifest" href="{{ url('manifest.json') }}">
<link rel="manifest" href="{{ url('manifest.json', [], $isSecure) }}">
</head>
<body>

View File

@ -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 () {