Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare's AMP Cache is no longer supported #24954

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions build-system/global-configs/caches.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
"updateCacheApiDomainSuffix": "cdn.ampproject.org",
"thirdPartyFrameDomainSuffix": "ampproject.net"
},
{
"id": "cloudflare",
"name": "Cloudflare AMP Cache",
"docs": "https://amp.cloudflare.com/",
"cacheDomain": "amp.cloudflare.com",
"updateCacheApiDomainSuffix": "amp.cloudflare.com",
"thirdPartyFrameDomainSuffix": "cloudflareamp.net"
},
{
"id": "bing",
"name": "Bing AMP Cache",
Expand Down
2 changes: 1 addition & 1 deletion build-system/tasks/json-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const log = require('fancy-log');
const through2 = require('through2');
const {jsonGlobs} = require('../test-configs/config');

const expectedCaches = ['cloudflare', 'google'];
const expectedCaches = ['google'];

const cachesJsonPath = 'build-system/global-configs/caches.json';

Expand Down
1 change: 0 additions & 1 deletion spec/amp-cache-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ For resources (i.e., HTML, images, fonts) that are larger than 12 MB, you may no

## References

* [Cloudflare AMP Cache](https://amp.cloudflare.com/)
* [Google AMP Cache](https://developers.google.com/amp/cache/)
* [Google AMP Cache Overview](https://developers.google.com/amp/cache/overview)
* The [Google AMP Cache](https://developers.google.com/amp/cache/) is a proxy-based content delivery network for delivering all valid AMP documents.
Expand Down
5 changes: 0 additions & 5 deletions spec/amp-cors-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,10 @@ Endpoints should only allow requests from: (1) the publisher's own origin; and

For example, endpoints should allow requests from:
* Google AMP Cache subdomain: `https://<publisher's domain>.cdn.ampproject.org` <br>(for example, `https://nytimes-com.cdn.ampproject.org`)
* Cloudflare AMP Cache: `https://<publisher's domain>.amp.cloudflare.com`

{% call callout('Read on', type='read') %}
For information on AMP Cache URL formats, see these resources:
- [Google AMP Cache Overview](https://developers.google.com/amp/cache/overview)
- [Cloudflare AMP Cache](https://amp.cloudflare.com/)
{% endcall %}


Expand Down Expand Up @@ -193,7 +191,6 @@ following:
1. If the origin does not match one of the following values, stop and return an error
response:
- `<publisher's domain>.cdn.ampproject.org`
- `<publisher's domain>.amp.cloudflare.com`
- the publisher's origin (aka yours)

where `*` represents a wildcard match, and not an actual asterisk ( * ).
Expand Down Expand Up @@ -227,7 +224,6 @@ Based on what we know about CORS and AMP (from [Verify CORS requests](#verify-co

* `example.com` --- Publisher's domain
* `example-com.cdn.ampproject.org` --- Google AMP Cache subdomain
* `example.com.amp.cloudflare.com`--- Cloudflare AMP Cache subdomain

### Response headers for allowed requests

Expand Down Expand Up @@ -273,7 +269,6 @@ function assertCors(req, res, opt_validMethods, opt_exposeHeaders) {
const allowedOrigins = [
"https://example.com",
"https://example-com.cdn.ampproject.org",
"https://example.com.amp.cloudflare.com",
"https://cdn.ampproject.org" ];

let origin;
Expand Down
4 changes: 2 additions & 2 deletions validator/engine/validator-in-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function getUrl(url) {
*/
amp.validator.isAmpCacheUrl = function(url) {
return (
url.toLowerCase().indexOf('cdn.ampproject.org') !== -1 || // lgtm [js/incomplete-url-substring-sanitization]
url.toLowerCase().indexOf('amp.cloudflare.com') !== -1); // lgtm [js/incomplete-url-substring-sanitization]
url.toLowerCase().indexOf('cdn.ampproject.org') !== -1 // lgtm [js/incomplete-url-substring-sanitization]
);
};

/**
Expand Down
4 changes: 0 additions & 4 deletions validator/testdata/feature_tests/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@
<form method="post" action-xhr="https://example-com.cdn.ampproject.org/subscribe" target="_blank">
<input type="submit" value="Subscribe">
</form>
<!-- Invalid: form action must be a non-cdn link -->
<form method="post" action-xhr="https://example-com.amp.cloudflare.com/subscribe" target="_blank">
<input type="submit" value="Subscribe">
</form>
<!-- Valid: disallowed domain checks subdomains, not suffix -->
<form method="post" action-xhr="https://example-cdn.ampproject.org/subscribe" target="_blank">
<input type="submit" value="Subscribe">
Expand Down