MediaWiki REL1_39
MediaWiki\Hook\ContentSecurityPolicyDirectivesHook Interface Reference

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

Inheritance diagram for MediaWiki\Hook\ContentSecurityPolicyDirectivesHook:

Public Member Functions

 onContentSecurityPolicyDirectives (&$directives, $policyConfig, $mode)
 If ContentSecurityPolicyDefaultSource and ContentSecurityPolicyScriptSource do not meet your needs, use this hook to modify the content security policy directives.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 12 of file ContentSecurityPolicyDirectivesHook.php.

Member Function Documentation

◆ onContentSecurityPolicyDirectives()

MediaWiki\Hook\ContentSecurityPolicyDirectivesHook::onContentSecurityPolicyDirectives ( & $directives,
$policyConfig,
$mode )

If ContentSecurityPolicyDefaultSource and ContentSecurityPolicyScriptSource do not meet your needs, use this hook to modify the content security policy directives.

Since
1.35
Parameters
string[]&$directivesArray of CSP directives
array$policyConfigCurrent configuration for the CSP 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: