ssdfdsf
All checks were successful
Deploy / deploy-staging (push) Successful in 40s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-09 01:26:54 +02:00
parent 94c985b118
commit 46cd272007
3 changed files with 35 additions and 8 deletions

View File

@@ -13,6 +13,18 @@ $projectRoot = dirname(__DIR__, 3);
$keycloakConfig = ConfigLoader::load($projectRoot, 'keycloak');
$auth = new KeycloakAuth($keycloakConfig);
$assetVersion = static function (string $publicPath) use ($projectRoot): string {
$filesystemPath = $projectRoot . '/public' . $publicPath;
if (!is_file($filesystemPath)) {
return $publicPath;
}
$mtime = filemtime($filesystemPath);
return $mtime === false ? $publicPath : $publicPath . '?v=' . $mtime;
};
if (!$auth->shouldShowDesktop()) {
header('Location: /auth/login', true, 302);
exit;
@@ -23,7 +35,7 @@ if (!$auth->shouldShowDesktop()) {
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mining-Checker</title>
<link rel="stylesheet" href="/assets/apps/mining-checker/app.css">
<link rel="stylesheet" href="<?= htmlspecialchars($assetVersion('/assets/apps/mining-checker/app.css'), ENT_QUOTES) ?>">
</head>
<body>
<main class="mining-app" id="mining-checker-app">
@@ -159,6 +171,6 @@ if (!$auth->shouldShowDesktop()) {
</article>
</template>
<script src="/assets/apps/mining-checker/app.js"></script>
<script src="<?= htmlspecialchars($assetVersion('/assets/apps/mining-checker/app.js'), ENT_QUOTES) ?>"></script>
</body>
</html>