Merge pull request #13059 from annando/disable-basicauth
Issue 13058: BasicAuth can now be disabled
This commit is contained in:
commit
f74cc59530
2 changed files with 5 additions and 1 deletions
|
@ -177,7 +177,7 @@ class BasicAuth
|
||||||
}
|
}
|
||||||
Logger::debug('Access denied', ['parameters' => $_SERVER]);
|
Logger::debug('Access denied', ['parameters' => $_SERVER]);
|
||||||
// Checking for commandline for the tests, we have to avoid to send a header
|
// 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"');
|
header('WWW-Authenticate: Basic realm="Friendica"');
|
||||||
}
|
}
|
||||||
throw new UnauthorizedException("This API requires login");
|
throw new UnauthorizedException("This API requires login");
|
||||||
|
|
|
@ -132,6 +132,10 @@ return [
|
||||||
// The value has to start with the scheme and end with a "/"
|
// The value has to start with the scheme and end with a "/"
|
||||||
'avatar_cache_url' => '',
|
'avatar_cache_url' => '',
|
||||||
|
|
||||||
|
// basicauth (Boolean)
|
||||||
|
// Controls if login via BasicAuth is possible (default is true)
|
||||||
|
'basicauth' => true,
|
||||||
|
|
||||||
// big_emojis (Boolean)
|
// big_emojis (Boolean)
|
||||||
// Display "Emoji Only" posts in big.
|
// Display "Emoji Only" posts in big.
|
||||||
'big_emojis' => false,
|
'big_emojis' => false,
|
||||||
|
|
Loading…
Reference in a new issue