mirror of
https://github.com/friendica/friendica
synced 2024-11-18 16:23:41 +00:00
Possibly fixing the test
This commit is contained in:
parent
5a5110d45a
commit
3dd35ef6ec
1 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,10 @@ class BasicAuth
|
|||
return 0;
|
||||
}
|
||||
Logger::debug('Access denied', ['parameters' => $_SERVER]);
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
// Checking for commandline for the tests, we have to avoid to send a header
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
}
|
||||
throw new UnauthorizedException("This API requires login");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue