Skip to content

Commit da665ca

Browse files
committed
Adjust: response header content-type
1 parent 76eb05b commit da665ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

application/controllers/ApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function indexAction(): never
7575
} catch (Throwable $e) {
7676
$response = new Response(
7777
status: 500,
78-
headers: ['Content-Type' => 'application/json'],
7978
body: json_encode([
8079
'message' => $e->getMessage(),
8180
])
@@ -132,6 +131,7 @@ protected function emitResponse(ResponseInterface $response): void
132131
header(sprintf('%s: %s', $name, $value), false);
133132
}
134133
}
134+
header('Content-Type: application/json');
135135

136136
echo $response->getBody();
137137
}

0 commit comments

Comments
 (0)