Clear up webhooks

This commit is contained in:
James Cole
2023-01-05 19:05:23 +01:00
parent 7bd824e8cb
commit 1fee2092d6
17 changed files with 219 additions and 115 deletions

View File

@@ -49,7 +49,7 @@ class AcceptHeaders
if ('GET' === $method && !$request->accepts(['application/json', 'application/vdn.api+json'])) {
throw new BadHttpHeaderException('Your request must accept either application/json or application/vdn.api+json.');
}
$allowed = ['application/x-www-form-urlencoded', 'application/json'];
$allowed = ['application/x-www-form-urlencoded', 'application/json',''];
$submitted = (string)$request->header('Content-Type');
if (('POST' === $method || 'PUT' === $method) && !in_array($submitted, $allowed, true)) {
$error = new BadHttpHeaderException(sprintf('Content-Type cannot be "%s"', $submitted));