Skip to content
Snippets Groups Projects
Commit 5d1673ed authored by Jesse Norell's avatar Jesse Norell
Browse files

Update rest.php to check if remote api is allowed.

parent 6006cbf0
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,11 @@ require_once '../../lib/config.inc.php';
$conf['start_session'] = false;
require_once '../../lib/app.inc.php';
$app->load('rest_handler');
$app->load('rest_handler,getconf');
$security_config = $app->getconf->get_security_config('permissions');
if($security_config['remote_api_allowed'] != 'yes') die('Remote API is disabled in security settings.');
$rest_handler = new ISPConfigRESTHandler();
$rest_handler->run();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment