From 746203b82d4fbb046165ad6454622252e901b584 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Tue, 31 Mar 2020 17:53:34 +0200 Subject: [PATCH] Allow any used HTTP request method for CORS (references #681) --- routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes.php b/routes.php index 8df89867..c5246360 100644 --- a/routes.php +++ b/routes.php @@ -250,8 +250,8 @@ $app->group('/api', function(RouteCollectorProxy $group) $group->get('/calendar/ical/sharing-link', '\Grocy\Controllers\CalendarApiController:IcalSharingLink'); } })->add(new CorsMiddleware([ - 'origin' => ["*"], - 'methods' => ["GET", "POST"], + 'origin' => ['*'], + 'methods' => ['GET', 'POST', 'PUT', 'DELETE'], 'headers.allow' => [ $container->get('ApiKeyHeaderName') ], 'headers.expose' => [ ], 'credentials' => false,