Piwik\View\

SecurityPolicy

Content Security Policy HTTP Header management class

Methods

The class defines the following methods:

addPolicy()

Appends a policy to a directive.

Signature

  • It accepts the following parameter(s):

    • $directive

    • $value

  • It does not return anything or a mixed result.

removeDirective()

Removes a directive.

Signature

  • It accepts the following parameter(s):

    • $directive
  • It does not return anything or a mixed result.

overridePolicy()

Overrides a directive.

Signature

  • It accepts the following parameter(s):

    • $directive

    • $value

  • It does not return anything or a mixed result.

disable()

Disable CSP

Signature

  • It does not return anything or a mixed result.

allowEmbedPage()

A less restrictive CSP which will allow embedding other sites with iframes (useful for heatmaps and session recordings)

Signature

  • It does not return anything or a mixed result.