ZenphotoCMS 1.6.3

securityHeaders

Static class to generate the headers as set on the plugin options

Table of Contents

Methods

getContentSecurityPolicySources()  : string
Gets headers from checkbox lists type options and returns them as string setup for header usage
setContentSecurityPolicy()  : mixed
Sets the Content-Security-Policy header
setHeaders()  : mixed
Sets all headers, to be used with the "theme_headers" filter hook
setReferrerPolicy()  : mixed
Sets the Referrer-Policy header
setStrictTransportSecurity()  : mixed
Sets the Strict-Transport-Security header
setXContentTypeOptions()  : mixed
Sets the X-Content-Type-Options header
setXFrameOptions()  : mixed
Sets the X-Frame-Options header
setXSSProtection()  : mixed
Sets the X-XSS-Protection header

Methods

getContentSecurityPolicySources()

Gets headers from checkbox lists type options and returns them as string setup for header usage

public static getContentSecurityPolicySources(string $policyname, array<string|int, mixed> $checkboxoptions) : string
Parameters
$policyname : string

The CSP policy name

$checkboxoptions : array<string|int, mixed>

The extra sources via checkbox options for the header. Key of entry is the source to set, value the option name as these are

Return values
string

setContentSecurityPolicy()

Sets the Content-Security-Policy header

public static setContentSecurityPolicy() : mixed

setHeaders()

Sets all headers, to be used with the "theme_headers" filter hook

public static setHeaders() : mixed

setReferrerPolicy()

Sets the Referrer-Policy header

public static setReferrerPolicy() : mixed

setStrictTransportSecurity()

Sets the Strict-Transport-Security header

public static setStrictTransportSecurity() : mixed

setXContentTypeOptions()

Sets the X-Content-Type-Options header

public static setXContentTypeOptions() : mixed

setXFrameOptions()

Sets the X-Frame-Options header

public static setXFrameOptions() : mixed

setXSSProtection()

Sets the X-XSS-Protection header

public static setXSSProtection() : mixed

        
On this page

Search results