mirror of
https://github.com/friendica/friendica
synced 2025-04-26 02:30:11 +00:00
Issue 13058: BasicAuth can now be disabled
This commit is contained in:
parent
c63a895672
commit
25636c2442
2 changed files with 5 additions and 1 deletions
|
@ -177,7 +177,7 @@ class BasicAuth
|
|||
}
|
||||
Logger::debug('Access denied', ['parameters' => $_SERVER]);
|
||||
// Checking for commandline for the tests, we have to avoid to send a header
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
if (DI::config()->get('system', 'basicauth') && (php_sapi_name() !== 'cli')) {
|
||||
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||
}
|
||||
throw new UnauthorizedException("This API requires login");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue