diff options
| author | fox <fox@fakecake.org> | 2026-10-14 21:41:11 +0300 |
|---|---|---|
| committer | GitLab <noreply@fakecake.org> | 2026-10-14 21:41:11 +0300 |
| commit | fa0e418228ec4ff79ef4b2024beb2491e15d538e (patch) | |
| tree | 906546542b5df2689ee6a0c16b889df82f947580 /classes/Response.php | |
| parent | c0135cc03916ad22707064e8957dce3f8e067a5d (diff) | |
| parent | 48d7b08a87adec0ce1c114bd5c70c0f6e108a954 (diff) | |
| download | the-epube-fa0e418228ec4ff79ef4b2024beb2491e15d538e.tar.gz the-epube-fa0e418228ec4ff79ef4b2024beb2491e15d538e.tar.xz | |
Merge branch 'dev' into 'master'
Dev See merge request git/the-epube!77
Diffstat (limited to 'classes/Response.php')
| -rw-r--r-- | classes/Response.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/Response.php b/classes/Response.php index ea5e93d..e45814b 100644 --- a/classes/Response.php +++ b/classes/Response.php @@ -6,7 +6,7 @@ class Response /** @var array<string, string> */ private array $headers = []; private string $body = ''; - private string $contentType = "text/json"; + private string $contentType = "application/json"; public function withStatus(int $code, string $reasonPhrase = ''): self { @@ -50,6 +50,8 @@ class Response if (!$contentTypeFound) header("Content-type: {$this->contentType}"); + header("X-Content-Type-Options: nosniff"); + http_response_code($this->status); echo $this->body; } |
