Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 8205292

Browse files
committed
Merge pull request #14 from symfony-cmf/json-content-type
Use JSON content-type when returning json
2 parents 0bfb162 + ad6dce2 commit 8205292

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Controller/ResourceController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public function resourceAction($repositoryName, $path)
4444
$context
4545
);
4646

47-
return new Response($json);
47+
$response = new Response($json);
48+
$response->headers->set('Content-Type', 'application/json');
49+
50+
return $response;
4851
}
4952
}

0 commit comments

Comments
 (0)