MediaWiki REL1_35
MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook:

Public Member Functions

 onContentSecurityPolicyScriptSource (&$scriptSrc, $policyConfig, $mode)
 Use this hook to modify the allowed CSP script sources.

Detailed Description

Stable to implement.

Definition at line 9 of file ContentSecurityPolicyScriptSourceHook.php.

Member Function Documentation

◆ onContentSecurityPolicyScriptSource()

MediaWiki\Hook\ContentSecurityPolicyScriptSourceHook::onContentSecurityPolicyScriptSource ( $scriptSrc,

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[]&$scriptSrcArray of CSP directives
array$policyConfigCurrent configuration for the CSP header
string$modeContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.

The documentation for this interface was generated from the following file: