mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 15:23:12 +08:00
Improved CrossDomainMiddleware preventing headers to be injected on non-CORS requests
This commit is contained in:
@@ -63,7 +63,7 @@ class CheckAuthenticationMiddleware implements MiddlewareInterface
|
||||
/** @var RouteResult $routeResult */
|
||||
$routeResult = $request->getAttribute(RouteResult::class);
|
||||
if ((isset($routeResult) && $routeResult->getMatchedRouteName() === 'rest-authenticate')
|
||||
|| strtolower($request->getMethod()) === 'options'
|
||||
|| $request->getMethod() === 'OPTIONS'
|
||||
) {
|
||||
return $out($request, $response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user