Skip to content
Snippets Groups Projects

Update file ResponseSubscriber.php

1 file
+ 1
0
Compare changes
  • Side-by-side
  • Inline
@@ -101,6 +101,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
@@ -101,6 +101,7 @@ class ResponseSubscriber implements EventSubscriberInterface {
if ($need_parse) {
if ($need_parse) {
$content = $response->getContent();
$content = $response->getContent();
if (strpos($content, '{"jsonapi"') === 0) {
if (strpos($content, '{"jsonapi"') === 0) {
 
$response->headers->set('Content-Type', 'application/json');
$this->jsonapiInclude->parse($response);
$this->jsonapiInclude->parse($response);
}
}
}
}
Loading