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

Update amp-cors-requests.md #9636

Merged
merged 1 commit into from Jun 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions spec/amp-cors-requests.md
Expand Up @@ -129,7 +129,7 @@ Endpoints should restrict requests to allow only the following origins:
- **Google AMP Cache subdomain**: `https://<publisher's subdomain>.cdn.ampproject.org`
(for example, `https://nytimes-com.cdn.ampproject.org`)
- **Google AMP Cache (legacy)**: `https://cdn.ampproject.org`
- **Cloudflare AMP Cache**: `https:<publisher's domain>.amp.cloudflare.com`
- **Cloudflare AMP Cache**: `https://<publisher's domain>.amp.cloudflare.com`
- The Publisher’s own origins

For information on AMP Cache URL formats, see these resources:
Expand Down Expand Up @@ -171,11 +171,14 @@ following:

**If the `Origin` header is set**:

1. If the origin is not one of the following values, stop and return an error
1. If the origin does not match one of the following values, stop and return an error
response:
- `*.ampproject.org`
- `*.amp.cloudflare.com`
- the publisher's origin (aka yours)

where `*` represents a wildcard match, and not an actual asterisk ( * ).

2. If the value of the `__amp_source_origin` query parameter is not the
publisher's origin, stop and return an error response.
3. If the two checks above pass, process the request.
Expand Down