Open ithinkihaveacat opened 6 years ago
This has become more urgent after bing released their AMP cache. Since most origins don't whitelist bing, any components that require CORS don't work.
The menu on all theguardian.com pages comes in via <amp-list>
, and it's completely blank when viewed via Bing's cache, compare:
The code for this is mostly in: https://github.com/ampproject/ampbench/blob/master/amp-story/linter/index.ts (is used for bookend tests for AMP Story).
ampbench should implement the tests described at "Testing CORS in AMP" (more information about CORS and AMP).
Rationale: for many interactive AMP pages to behave correctly when viewed on an AMP Cache, the origin needs to respond in a particular way to browsers' requests so that the CORS mechanism is successfully negotiated, and the browser has access to all the resource (e.g. fonts, POST endpoints) that it requires to correctly render the page.