MediaWiki REL1_37
|
This is a hook handler interface, see docs/Hooks.md. More...
Public Member Functions | |
onContentSecurityPolicyScriptSource (&$scriptSrc, $policyConfig, $mode) | |
Use this hook to modify the allowed CSP script sources. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ContentSecurityPolicyScriptSource" to register handlers implementing this interface.
Definition at line 12 of file ContentSecurityPolicyScriptSourceHook.php.
MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook::onContentSecurityPolicyScriptSource | ( | & | $scriptSrc, |
$policyConfig, | |||
$mode | |||
) |
Use this hook to modify the allowed CSP script sources.
Note that you also have to use ContentSecurityPolicyDefaultSource if you want non-script sources to be loaded from whatever you add.
string[] | &$scriptSrc | Array of CSP directives |
array | $policyConfig | Current configuration for the CSP header |
string | $mode | ContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header |
Implemented in MediaWiki\HookContainer\HookRunner.