add BodyParsingMiddleware because PUT request don't have access on body data

This commit is contained in:
Uwe Steinmann 2025-02-06 11:18:58 +01:00
parent c940162328
commit 35d7d132d3

View File

@ -3174,6 +3174,11 @@ $app->addErrorMiddleware(true, true, true);
$app->add(new RestapiCorsMiddleware($container));
/* Without the BodyParsingMiddleware the body of PUT Request will
* not be parsed in Slim4
*/
$app->addBodyParsingMiddleware();
// Make CORS preflighted request possible
$app->options('/{routes:.+}', function ($request, $response, $args) {
return $response;