feat : cors
This commit is contained in:
@@ -21,6 +21,8 @@ class CorsMiddleware implements MiddlewareInterface
|
|||||||
->withHeader('Access-Control-Allow-Methods', '*')
|
->withHeader('Access-Control-Allow-Methods', '*')
|
||||||
->withHeader('Access-Control-Max-Age', 1800);
|
->withHeader('Access-Control-Max-Age', 1800);
|
||||||
|
|
||||||
|
Context::set(ResponseInterface::class, $response);
|
||||||
|
|
||||||
if ($request->getMethod() == 'OPTIONS') {
|
if ($request->getMethod() == 'OPTIONS') {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user