Update: 2026-06-11 19:26:42
This commit is contained in:
@@ -13,7 +13,7 @@ header('Content-Type: application/json');
|
||||
$expectedToken = trim(file_get_contents('/home/intaleq-wallet/.mtnKey')); // يجب استبداله بتوكن حقيقي
|
||||
$receivedToken = $_SERVER['HTTP_X_AUTH_TOKEN'] ?? '';
|
||||
|
||||
if ($receivedToken !== $expectedToken) {
|
||||
if (!hash_equals($expectedToken, $receivedToken)) {
|
||||
http_response_code(401); // Unauthorized
|
||||
echo json_encode(["status" => "error", "message" => "Authentication failed."]);
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user