forked from GNUsocial/gnu-social
make API realm configurable
This commit is contained in:
parent
e5541d09d0
commit
5f7aa6f2e3
@ -235,7 +235,11 @@ class ApiAuthAction extends ApiAction
|
||||
{
|
||||
$this->basicAuthProcessHeader();
|
||||
|
||||
$realm = common_config('site', 'name') . ' API';
|
||||
$realm = common_config('api', 'realm');
|
||||
|
||||
if (empty($realm)) {
|
||||
$realm = common_config('site', 'name') . ' API';
|
||||
}
|
||||
|
||||
if (!isset($this->auth_user_nickname) && $required) {
|
||||
header('WWW-Authenticate: Basic realm="' . $realm . '"');
|
||||
|
@ -293,4 +293,6 @@ $default =
|
||||
array('crawldelay' => 0,
|
||||
'disallow' => array('main', 'settings', 'admin', 'search', 'message')
|
||||
),
|
||||
'api' =>
|
||||
array('realm' => null),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user