File Manager V1.5
FILE_CONTENT: logout.php
<?php
require 'db.php';
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, PATCH, OPTIONS");
header("Access-Control-Allow-Headers: Authorization, Content-Type, Accept, X-Requested-With, User-Agent, Origin");
header("Access-Control-Max-Age: 86400");
header("Content-Type: application/json; charset=UTF-8");
$headers = getallheaders();
if (!isset($headers['Authorization'])) {
http_response_code(401);
echo json_encode(['success' => false, 'message' => 'Authorization header missing']);
exit;
}
$token = str_replace('Bearer ', '', $headers['Authorization']);
// Можно добавить токен в черный список (реализация зависит от вашей системы)
echo json_encode([
'success' => true,
'message' => 'Logged out successfully'
]);[ KEMBALI ]