MediaWiki  master
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. More...
 

Detailed Description

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

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

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
string$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: