MediaWiki  master
MediaWiki\Hook\ContentSecurityPolicyDirectivesHook Interface Reference

Stable to implement. 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. More...
 

Detailed Description

Stable to implement.

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