MediaWiki REL1_40
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
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 |
int | $mode | ContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header |
Implemented in MediaWiki\HookContainer\HookRunner.