Skip to content

Commit

Permalink
MDL-70323 core_h5p: Add H5P crossOrigin setting
Browse files Browse the repository at this point in the history
  • Loading branch information
golenkovm committed Oct 24, 2021
1 parent e5894c0 commit 4c7bf9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions config-dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,14 @@
// 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!!!
Expand Down
2 changes: 1 addition & 1 deletion h5p/classes/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public static function get_core_settings(): array {
'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(),
Expand Down

0 comments on commit 4c7bf9e

Please sign in to comment.