Carry headers through the handler

This commit is contained in:
Nabeel Shahzad
2019-08-22 12:26:46 -04:00
parent dd2b297cc5
commit 3d6a29795b
2 changed files with 6 additions and 6 deletions

View File

@@ -49,13 +49,15 @@ abstract class HttpException extends SymfonyHttpException
*/
public function getResponse()
{
$headers = [];
$headers['content-type'] = 'application/problem+json';
$headers = array_merge($headers, $this->getHeaders());
return response()
->json(
$this->getJson(),
$this->getStatusCode(),
[
'content-type' => 'application/problem+json',
]
$headers
);
}
}