优化代码
parent
d93ec44d5c
commit
8aba19c21d
|
@ -28,7 +28,7 @@ class CorsMiddleware implements MiddlewareInterface
|
||||||
|
|
||||||
Context::set(ResponseInterface::class, $response);
|
Context::set(ResponseInterface::class, $response);
|
||||||
|
|
||||||
if ($request->getMethod() == 'OPTIONS') {
|
if ($request->getMethod() == 'OPTIONS' || $request->getUri()->getPath() == '/favicon.ico') {
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue