Disable api page + public apis when settings.display.api = false
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ module.exports = function() {
|
||||
var method_enabled = settings.public_api.rpc[method];
|
||||
|
||||
// only show disabled msg for outside calls. internal calls should always go through
|
||||
if (method_enabled == null || !method_enabled && req.headers.host.indexOf('127.0.0.1') == -1)
|
||||
if ((!settings.display.api || method_enabled == null || !method_enabled) && req.headers.host.indexOf('127.0.0.1') == -1)
|
||||
res.end('This method is disabled');
|
||||
else {
|
||||
if (accesslist.type == 'all')
|
||||
|
||||
Reference in New Issue
Block a user