core/modules/rest/src/Routing/ResourceRoutes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php index f9c92cd..c21f13c 100644 --- a/core/modules/rest/src/Routing/ResourceRoutes.php +++ b/core/modules/rest/src/Routing/ResourceRoutes.php @@ -117,7 +117,7 @@ protected function getRoutesForResourceConfig(RestResourceConfigInterface $rest_ // - set the allowed request body content types/formats for methods that // allow request bodies to be sent // - set the allowed authentication providers - if (!in_array($method, ['HEAD', 'GET', 'DELETE'])) { + if (in_array($method, ['POST', 'PATCH', 'PUT'], TRUE)) { // Restrict the incoming HTTP Content-type header to the allowed // formats. $route->addRequirements(['_content_type_format' => implode('|', $rest_resource_config->getFormats($method))]);