From 52478ca60a61b867eaee27390edfdde59914f3b7 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 14 Apr 2017 13:27:41 +0200 Subject: [PATCH] Returned all allowed methods until fast route router is fixed --- module/Rest/src/Middleware/CrossDomainMiddleware.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Rest/src/Middleware/CrossDomainMiddleware.php b/module/Rest/src/Middleware/CrossDomainMiddleware.php index eabbe0ac..213a3541 100644 --- a/module/Rest/src/Middleware/CrossDomainMiddleware.php +++ b/module/Rest/src/Middleware/CrossDomainMiddleware.php @@ -36,8 +36,8 @@ class CrossDomainMiddleware implements MiddlewareInterface, RequestMethodInterfa // Add OPTIONS-specific headers foreach ([ -// 'Access-Control-Allow-Methods' => 'GET,POST,PUT,DELETE,OPTIONS', // TODO Should be based on path - 'Access-Control-Allow-Methods' => $response->getHeaderLine('Allow'), + 'Access-Control-Allow-Methods' => 'GET,POST,PUT,DELETE,OPTIONS', // TODO Should be dynamic +// 'Access-Control-Allow-Methods' => $response->getHeaderLine('Allow'), 'Access-Control-Max-Age' => '1000', 'Access-Control-Allow-Headers' => $request->getHeaderLine('Access-Control-Request-Headers'), ] as $key => $value) {