diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-22 13:45:47 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-22 14:13:28 +0500 |
| commit | aad9ffc2c02ccce9098558503e130e4cc9fc35b3 (patch) | |
| tree | d32f070060a5e51381812d6bfb9e9e04b5637a8c /src/alert.php | |
| parent | 460d12ab7bb93daa6b03300fefdfccefb6d32d01 (diff) | |
feat: CLIENT_REQUIRES_JSON constant, json_response and clamp method
Diffstat (limited to 'src/alert.php')
| -rw-r--r-- | src/alert.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/alert.php b/src/alert.php index 62045d5..2ea9965 100644 --- a/src/alert.php +++ b/src/alert.php @@ -4,6 +4,7 @@ function generate_alert(string $path, string $error, int $status = 400) http_response_code($status); if (isset($_SERVER["HTTP_ACCEPT"]) && $_SERVER["HTTP_ACCEPT"] == "application/json") { + header("Content-Type: application/json"); echo json_encode([ "status_code" => $status, "message" => $error, |
