We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a7dcf commit 1545ad9Copy full SHA for 1545ad9
src/Http/Requests/JsonApiRequest.php
@@ -50,9 +50,15 @@ protected function getValidatorInstance()
50
51
/**
52
* Perform additional logic before the request input is validated.
53
+ *
54
+ * @throws HttpException
55
*/
56
protected function beforeValidation()
57
{
58
+ if (!$this->isJson()) {
59
+ throw new HttpException('Unsupported Content-Type value', Reponse::HTTP_UNSUPPORTED_MEDIA_TYPE);
60
+ }
61
+
62
if ($this->exists('include') && config('jsonapi.enable_included_resources') === false) {
63
throw new HttpException('Inclusion of related resources is not supported');
64
}
0 commit comments