MediaWiki  master
MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook:

Public Member Functions

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

Detailed Description

Stable to implement.

Definition at line 9 of file ContentSecurityPolicyDefaultSourceHook.php.

Member Function Documentation

◆ onContentSecurityPolicyDefaultSource()

MediaWiki\Hook\ContentSecurityPolicyDefaultSourceHook::onContentSecurityPolicyDefaultSource ( $defaultSrc,

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.

string[]&$defaultSrcArray of Content-Security-Policy allowed sources
array$policyConfigCurrent configuration for the Content-Security-Policy 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: