MDL-70323 core_h5p: Add H5P crossOrigin setting

This commit is contained in:
Mikhail Golenkov 2021-08-11 11:52:49 +10:00
parent e5894c0455
commit 4c7bf9eb7e
2 changed files with 9 additions and 1 deletions

View File

@ -733,6 +733,14 @@ $CFG->admin = 'admin';
// automatically generating them. This is only needed if you want to ensure that keys are consistent
// across a cluster when not using shared storage. If you stop the server generating keys, you will
// need to manually generate them by running 'php admin/cli/generate_key.php'.
//
// H5P crossorigin
//
// $CFG->h5pcrossorigin = 'anonymous';
//
// Settings this to anonymous will enable CORS requests for media elements to have the credentials
// flag set to 'same-origin'. This may be needed when using tool_objectfs as an alternative file
// system with CloudFront configured.
//=========================================================================
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!

View File

@ -344,7 +344,7 @@ class helper {
'user' => $usersettings,
'hubIsEnabled' => true,
'reportingIsEnabled' => false,
'crossorigin' => null,
'crossorigin' => !empty($CFG->h5pcrossorigin) ? $CFG->h5pcrossorigin : null,
'libraryConfig' => $core->h5pF->getLibraryConfig(),
'pluginCacheBuster' => self::get_cache_buster(),
'libraryUrl' => autoloader::get_h5p_core_library_url('js')->out(),