MediaWiki REL1_35
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.
 

Detailed Description

Stable to implement.

Definition at line 9 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: