'Off', 1 => 'On'); ?>

HTTP Headers

Security Headers

X-Frame-Options

This header can be used to indicate whether or not a browser should be allowed to render a page in a <frame>, <iframe> or <object> . Use this to avoid clickjacking attacks.

X-Frame-Options $v) { ?>

/>
X-XSS-Protection

This header enables the Cross-site scripting (XSS) filter built into most recent web browsers. It's usually enabled by default anyway, so the role of this header is to re-enable the filter for this particular website if it was disabled by the user.

X-XSS-Protection $v) { ?>

X-Content-Type-Options

Prevents Internet Explorer and Google Chrome from MIME-sniffing a response away from the declared content-type. This also applies to Google Chrome, when downloading extensions. This reduces exposure to drive-by download attacks and sites serving user uploaded content that, by clever naming, could be treated by MSIE as executable or dynamic HTML files.

X-Content-Type-Options $v) { ?>

Strict-Transport-Security

HTTP Strict-Transport-Security (HSTS) enforces secure (HTTP over SSL/TLS) connections to the server. This reduces impact of bugs in web applications leaking session data through cookies and external links and defends against Man-in-the-middle attacks. HSTS also disables the ability for user's to ignore SSL negotiation warnings.

Strict-Transport-Security $v) { ?>

max-age:
includeSubDomains: />
preload: />
Public-Key-Pins

HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates.

Public-Key-Pins $v) { ?>

pin-sha256: />
pin-sha256:
(backup key)
/>
max-age:
includeSubDomains: />
report-uri: />
X-UA-Compatible

In some cases, it might be necessary to restrict a webpage to a document mode supported by an older version of Windows Internet Explorer. Here we look at the x-ua-compatible header, which allows a webpage to be displayed as if it were viewed by an earlier version of the browser.

X-UA-Compatible $v) { ?>

P3P

The Platform for Privacy Preferences Project (P3P) is a protocol allowing websites to declare their intended use of information they collect about web browser users.

P3P $v) { ?>

Compact ACCESS $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact DISPUTES $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact REMEDIES $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact NON-IDENTIFIABLE $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact PURPOSE $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact RECIPIENT $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact RETENTION $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact CATEGORIES $item) { if ($i > 0 && $i % 4 === 0) { ?>
Compact TEST $item) { if ($i > 0 && $i % 4 === 0) { ?>
Referrer-Policy

The Referrer-Policy HTTP header governs which referrer information, sent in the Referer header, should be included with requests made.

Referrer-Policy $v) { ?>

Cross-domain headers

Access-Control-Allow-Origin

The Access-Control-Allow-Origin header indicates whether a resource can be shared.

Access-Control-Allow-Credentials $v) { ?>

/>
Access-Control-Allow-Credentials

The Access-Control-Allow-Credentials header indicates whether the response to request can be exposed when the credentials flag is true.

Access-Control-Allow-Credentials $v) { ?>

Access-Control-Expose-Headers

The Access-Control-Expose-Headers response header brings information about headers that browsers could allow accessing.

Access-Control-Expose-Headers $v) { ?>

$item) { if ($i % 3 === 0) { ?>
Access-Control-Max-Age

The Access-Control-Max-Age header indicates how much time, the result of a preflight request, can be cached.

Access-Control-Max-Age $v) { ?>

>
Access-Control-Allow-Methods

The Access-Control-Allow-Methods header is returned by the server in a response to a preflight request and informs the browser about the HTTP methods that can be used in the actual request.

Access-Control-Allow-Methods $v) { ?>

Access-Control-Allow-Headers

The Access-Control-Allow-Headers header is returned by the server in a response to a preflight request and informs the browser about the HTTP headers that can be used in the actual request.

Access-Control-Allow-Credentials $v) { ?>

$item) { if ($i % 3 === 0) { ?>