MDL-77054 files: Allow CORS in tokenpluginfile.php

This commit is contained in:
Juan Leyva 2023-11-30 12:22:26 +01:00
parent 6374475dc3
commit 89481f9405

View File

@ -31,6 +31,9 @@ define('NO_DEBUG_DISPLAY', true);
require_once('config.php');
// Allow CORS requests.
header('Access-Control-Allow-Origin: *');
$relativepath = get_file_argument();
$token = optional_param('token', '', PARAM_ALPHANUM);
if (0 == strpos($relativepath, '/token/')) {