Documentation ¶
Overview ¶
Auxiliary functions for use by Signer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MutateFetchedContentSecurityPolicy ¶
Some Content-Security-Policy (CSP) configurations have the ability to break AMPHTML document functionality on the AMPHTML Cache if set on the document. This method parses the publisher's provided CSP and mutates it to ensure that the document is not broken on the AMP Cache.
Specifically, the following CSP directives are passed through unmodified:
- base-uri
- block-all-mixed-content
- font-src
- form-action
- manifest-src
- referrer
- upgrade-insecure-requests
And the following CSP directives are overridden to specific values:
- object-src
- report-uri
- script-src
- style-src
- default-src
All other CSP directives (see https://w3c.github.io/webappsec-csp/) are stripped from the publisher provided CSP.
Types ¶
Click to show internal directories.
Click to hide internal directories.