차량 모니터 인증 유지를 보강
This commit is contained in:
+18
-2
@@ -548,6 +548,24 @@ function car_monitor_launcher_session(): array
|
||||
return $session;
|
||||
}
|
||||
|
||||
$commonAuth = '/mnt/synology-web/custom/common/auth.php';
|
||||
if (is_readable($commonAuth)) {
|
||||
require_once $commonAuth;
|
||||
|
||||
if (function_exists('custom_has_auth_cookie') && custom_has_auth_cookie()) {
|
||||
$session = ['authenticated' => true, 'admin' => false];
|
||||
return $session;
|
||||
}
|
||||
|
||||
if (function_exists('custom_is_site_admin') && custom_is_site_admin()) {
|
||||
if (function_exists('custom_issue_auth_cookie')) {
|
||||
custom_issue_auth_cookie();
|
||||
}
|
||||
$session = ['authenticated' => true, 'admin' => true];
|
||||
return $session;
|
||||
}
|
||||
}
|
||||
|
||||
$cookieHeader = trim((string)($_SERVER['HTTP_COOKIE'] ?? ''));
|
||||
if ($cookieHeader === '') {
|
||||
$session = ['authenticated' => false, 'admin' => false];
|
||||
@@ -629,8 +647,6 @@ a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;
|
||||
<body>
|
||||
<main class="box">
|
||||
<h1>인증이 필요합니다</h1>
|
||||
<p>런처에서 관리자 세션 또는 공통 비밀번호 인증을 완료한 뒤 차량 모니터에 접속할 수 있습니다.</p>
|
||||
<a href="https://chaegeon.com/blog">런처로 이동</a>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user