Merge branch 'MDL-51588-master' of git://github.com/FMCorz/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 6 Oct 2015 10:41:01 +0000 (11:41 +0100)
committerDan Poltawski <dan@moodle.com>
Tue, 6 Oct 2015 15:31:36 +0000 (16:31 +0100)
webservice/pluginfile.php

index f49480f..2d3cdad 100644 (file)
@@ -38,6 +38,9 @@ require_once(dirname(dirname(__FILE__)) . '/config.php');
 require_once($CFG->libdir . '/filelib.php');
 require_once($CFG->dirroot . '/webservice/lib.php');
 
+// Allow CORS requests.
+header('Access-Control-Allow-Origin: *');
+
 //authenticate the user
 $token = required_param('token', PARAM_ALPHANUM);
 $webservicelib = new webservice();