question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Signed Exchanges: understand AMP runtime's needs for serving origin identity

See original GitHub issue

@ampproject/wg-ui-and-a11y

With 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:closed
  • Created 5 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
honeybadgerdontcarecommented, Jan 16, 2019

The AMP Packager transformer transformerIdentifier.go will add the attribute transformed with value google;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">

0reactions
Gregablecommented, Feb 25, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signed Exchanges (SXGs) - web.dev
An SXG is a delivery mechanism that makes it possible to authenticate the origin of a resource independently of how it was delivered....
Read more >
Signed exchanges / AMP Real URL - Cloudflare Docs
Cloudflare Fundamentals provides information about features that span Cloudflare products.
Read more >
Serve AMP using signed exchanges
A signed exchange is made up of a valid AMP document and the original URL of the content. This information is protected by...
Read more >
Signed Exchanges on Google Search | Documentation
Learn about specific requirements for signed exchanges and how they allow Google Search to prefetch your content while preserving user privacy.
Read more >
rabbitmqctl(8) — RabbitMQ
rabbitmqctl is the main command line tool for managing a RabbitMQ server node, together with rabbitmq-diagnostics , rabbitmq-upgrade , and others. It performs ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found