MDL-39759 REST SERVER HTTP response code
Moodle should response 403 if web service or REST protocol not enabled
This commit is contained in:
@@ -37,6 +37,7 @@ require('../../config.php');
|
||||
require_once("$CFG->dirroot/webservice/rest/locallib.php");
|
||||
|
||||
if (!webservice_protocol_is_enabled('rest')) {
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
debugging('The server died because the web services or the REST protocol are not enable',
|
||||
DEBUG_DEVELOPER);
|
||||
die;
|
||||
|
||||
Reference in New Issue
Block a user