mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 05:44:36 +02:00
Don't redirect unauthenticated API requests to the login page
refs #11151
This commit is contained in:
parent
c5281935c6
commit
8a4f15d32c
@ -282,10 +282,7 @@ class Auth
|
||||
if ($request->isXmlHttpRequest() || ! $request->isApiRequest()) {
|
||||
return false;
|
||||
}
|
||||
if (($header = $request->getHeader('Authorization')) === false) {
|
||||
return false;
|
||||
}
|
||||
if (empty($header)) {
|
||||
if (($header = $request->getHeader('Authorization')) === false || empty($header)) {
|
||||
$this->challengeHttp();
|
||||
}
|
||||
list($scheme) = explode(' ', $header, 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user