movmaker-webui/logout.php
2026-05-25 22:28:05 +02:00

12 lines
377 B
PHP

<?php
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
setcookie('mvlog_realm', bin2hex(random_bytes(8)), [
'expires' => time() + 31536000,
'path' => '/mvlog',
'secure' => $secure,
'httponly' => true,
'samesite' => 'Lax',
]);
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Location: index.php');
exit;