Signed Exchanges: understand AMP runtime's needs for serving origin identity
See original GitHub issueWith Signed Exchanges, AMP documents will be operating on the publisher origin, even if the document is served from the AMP Cache. By default, the AMP runtime will not be able to determine if the document was served by the AMP cache or the Publisher.
The open question is if the runtime makes any decisions based on the origin being *.cdn.ampproject.org
, etc. A hypothetical example could be rewriting images in amp-bind
with a cdn.ampproject.org
cache URL.
If the AMP runtime does not make any such decisions, this issue can simply be closed. If it does, signed exchanges can provide metadata in the document which the runtime can use to make that decision. We should determine what the syntax of this metadata should be.
@honeybadgerdontcare for the syntax of the <html amp transformed=>
attribute which may be sufficient.
If not, we can also do something like:
<meta name="amp-cache-origin" content="cdn.ampproject.org">
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (8 by maintainers)
Top GitHub Comments
The AMP Packager transformer transformerIdentifier.go will add the attribute
transformed
with valuegoogle;v=1
to the<html>
tag. The value is validated by the AMP Validator.This follows the form of the AMP-Cache-Transform header. It explicitly states the CDN performing the transform and the transformer version used.
E.g.
<html amp transformed="google;v=1">
We discussed this for ~5 minutes offline and concluded that for now
transformd=google...
is a sufficient marker for AMP runtime.The other suggestion that was raised is that other caches could implement these modifications in the future by mandating an alternative source for
v0.js
which makes the necessary changes to the runtime config.Closing this issue. @jridgewell for filing any issues that for runtime changes that may be needed.