Прежняя git-история утрачена при переносе проекта на машину владельца (снапшот без .git). Хэши коммитов в docs/reports/* относятся к утраченной истории. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 lines
445 B
PHP
24 lines
445 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* POST /api/logout.php → 200 {ok:true}, сессия уничтожена | 403.
|
|
*/
|
|
|
|
require __DIR__ . '/../lib/http.php';
|
|
require __DIR__ . '/../lib/auth.php';
|
|
|
|
http_security_headers();
|
|
|
|
try {
|
|
method_must('POST');
|
|
require_client_header();
|
|
|
|
logout_user();
|
|
|
|
json_out(['ok' => true]);
|
|
} catch (Throwable $e) {
|
|
error_log('logout: ' . $e->getMessage());
|
|
error_out(500, 'internal');
|
|
}
|