Returned all allowed methods until fast route router is fixed

This commit is contained in:
Alejandro Celaya 2017-04-14 13:27:41 +02:00
parent 62b49dcb19
commit 52478ca60a

View file

@ -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) {