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
- the signature header must be a subset of structured-headers
- signed exchanges must not vary
- the content must be text/html in utf-8 (either via content type or
implicitly via the meta tag).
Copy file name to clipboardExpand all lines: docs/cache_requirements.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,9 @@ The Google AMP cache sets some requirements in addition to the ones set by the
15
15
These include:
16
16
17
17
* The signed `fallback URL` must equal the URL at which the SXG was delivered.
18
+
* The signature header must contain only:
19
+
* One parameterised identifier.
20
+
* Parameter values of type string, binary, or identifier.
18
21
* The payload must be:
19
22
* non-empty.
20
23
* valid transformed AMP. The canonical definition of transformed AMP is the
@@ -37,11 +40,15 @@ These include:
37
40
`manifest-src`, `referrer`, and `upgrade-insecure-requests` may be omitted
38
41
or have any value
39
42
* all other directives are disallowed
43
+
* The signed `content-type` header must be present. Its media type must be
44
+
`text/html`. Its `charset` parameter, if present, must case-insensitively
45
+
equal `utf-8`.
40
46
* The signed `link` header, if present, must look like [this](https://github.com/ampproject/amppackager/blob/e4bf0430ba152cfe82ccf063df92021dfc0f26a5/packager/signer/signer.go#L426)
41
47
(the validation logic is currently very picky about its serialization); and
42
48
have limits like [this](https://github.com/ampproject/amppackager/blob/e4bf0430ba152cfe82ccf063df92021dfc0f26a5/transformer/transformer.go#L177)
43
49
(e.g. max 20 urls, rel=preload only, as=script|style only). URLs must be
44
50
limited to `cdn.ampproject.org` and the allowlisted [font provider URLs](https://github.com/ampproject/amphtml/blob/b0ff92429923c86f3973009a84ff02f4f1868b4d/validator/validator-main.protoascii#L310).
51
+
* There must not be a signed `variant-key-04` or `variants-04` header.
45
52
* The signature's duration (expiry minus date) must be >= 4 days.
46
53
47
54
The above is an attempt at a complete list of SXG-related requirements, but it
0 commit comments