diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/apiauth.php | 6 | ||||
-rw-r--r-- | lib/default.php | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/apiauth.php b/lib/apiauth.php index 5090871cf..f63c84d8f 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -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 . '"'); diff --git a/lib/default.php b/lib/default.php index f22d8b24a..10f3f1a97 100644 --- a/lib/default.php +++ b/lib/default.php @@ -294,4 +294,6 @@ $default = array('crawldelay' => 0, 'disallow' => array('main', 'settings', 'admin', 'search', 'message') ), + 'api' => + array('realm' => null), ); |