You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cache_requirements.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,18 +34,17 @@ These include:
34
34
it cannot have a value (i.e. `no-cache=some-header` is disallowed).
35
35
* The signed `content-security-policy` header must be present and comply with
36
36
these rules:
37
-
*`default-src`, `script-src`, `object-src`, `style-src`, and `report-uri`
38
-
must equal those from the [AMP cache CSP](https://github.com/ampproject/amppackager/blob/c54d36556d56d5a604eea079ef7dc8067f67e1ea/packager/signer/signer.go#L244-L255)
37
+
*`default-src`, `script-src`, `object-src`, and `style-src` must equal
38
+
those from the [AMP cache CSP](https://github.com/ampproject/amppackager/blob/e581627de0f60e41cd073de8f097bd3e7259ffdf/packager/signer/signer.go#L246-L259).
* The signed `content-type` header must be present. Its media type must be
44
44
`text/html`. Its `charset` parameter, if present, must case-insensitively
45
45
equal `utf-8`.
46
-
* The signed `link` header, if present, must look like [this](https://github.com/ampproject/amppackager/blob/e4bf0430ba152cfe82ccf063df92021dfc0f26a5/packager/signer/signer.go#L426)
47
-
(the validation logic is currently very picky about its serialization); and
48
-
have limits like [this](https://github.com/ampproject/amppackager/blob/e4bf0430ba152cfe82ccf063df92021dfc0f26a5/transformer/transformer.go#L177)
46
+
* The signed `link` header, if present, must
47
+
have limits like [this](https://github.com/ampproject/amppackager/blob/a5bb0248b0fd0bf2ad6e4d47ca444261c6409e3f/transformer/transformer.go#L201)
49
48
(e.g. max 20 urls, rel=preload only, as=script|style only). URLs must be
50
49
limited to `cdn.ampproject.org` and the allowlisted [font provider URLs](https://github.com/ampproject/amphtml/blob/b0ff92429923c86f3973009a84ff02f4f1868b4d/validator/validator-main.protoascii#L310).
51
50
* There must not be a signed `variant-key-04` or `variants-04` header.
0 commit comments