Allow any used HTTP request method for CORS (references #681)

This commit is contained in:
Bernd Bestel
2020-03-31 17:53:34 +02:00
parent 8e82525732
commit 746203b82d

View File

@@ -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,