MediaWiki REL1_39
MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook:

Public Member Functions

 onContentSecurityPolicyDefaultSource (&$defaultSrc, $policyConfig, $mode)
 Use this hook to modify the allowed CSP load sources.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ContentSecurityPolicyDefaultSource" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 12 of file ContentSecurityPolicyDefaultSourceHook.php.

Member Function Documentation

◆ onContentSecurityPolicyDefaultSource()

MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook::onContentSecurityPolicyDefaultSource ( & $defaultSrc,
$policyConfig,
$mode )

Use this hook to modify the allowed CSP load sources.

This affects all directives except for the script directive. To add a script source, see ContentSecurityPolicyScriptSource hook.

Since
1.35
Parameters
string[]&$defaultSrcArray of Content-Security-Policy allowed sources
array$policyConfigCurrent configuration for the Content-Security-Policy header
int$modeContentSecurityPolicy::REPORT_ONLY_MODE or ContentSecurityPolicy::FULL_MODE depending on type of header
Returns
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: