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

Reformat domains in .md files as non-clickable links and remove unnecessary whitelist entries #10746

Merged
merged 1 commit into from Aug 1, 2017
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion ads/google/a4a/docs/Network-Impl-Guide.md
Expand Up @@ -51,7 +51,7 @@ Client side verification of the signature, and thus preferential rendering, requ

Fast Fetch requires that the ad request be sent via [XHR CORS](https://www.w3.org/TR/cors/) as this allows for direct communication with the ad network without the possibility of custom javascript execution (e.g. iframe or JSONP). XHR CORS requires a preflight request where the response needs to indicate if the request is allowed by including the following headers in the response::

* "Access-Control-Allow-Origin" with value matching the value of the request "Origin" header only if the origin domain is allowed ("Note that requests from pages hosted on the Google AMP Cache will have a value matching the domain [https://cdn.ampproject.org](https://cdn.ampproject.org)").
* "Access-Control-Allow-Origin" with value matching the value of the request "Origin" header only if the origin domain is allowed ("Note that requests from pages hosted on the Google AMP Cache will have a value matching the domain `https://cdn.ampproject.org`").

* "AMP-Access-Control-Allow-Source-Origin" with value matching the value of the request parameter "__amp_source_origin" which is [added](https://github.com/ampproject/amphtml/blob/master/src/service/xhr-impl.js#L103) by the AMP HTML runtime and matches the origin of the request had the page not been served from [Google AMP Cache](https://www.ampproject.org/docs/get_started/about-amp.html) (the originating source of the page). Ad network can use this to prevent access by particular publisher domains where lack of response header will cause the response to be [dropped](https://github.com/ampproject/amphtml/blob/master/src/service/xhr-impl.js#L137) by the AMP HTML runtime.

Expand Down
8 changes: 0 additions & 8 deletions build-system/tasks/check-links.js
Expand Up @@ -149,17 +149,9 @@ function filterWhitelistedLinks(markdown) {
// Links in script tags (illustrative, and not always valid)
filteredMarkdown = filteredMarkdown.replace(/src="http.*?"/g, '');

// Direct links to the https://cdn.ampproject.org domain (not a valid page)
filteredMarkdown =
filteredMarkdown.replace(/https:\/\/cdn\.ampproject\.org(?!\/)/g, '');

// Links inside a <code> block (illustrative, and not always valid)
filteredMarkdown = filteredMarkdown.replace(/<code>(.*?)<\/code>/g, '');

// Dailymotion link that is marked dead in Travis CI
filteredMarkdown = filteredMarkdown.replace(
/https:\/\/developer\.dailymotion\.com\/player#player-parameters/g, '');

// After all whitelisting is done, clean up any remaining empty blocks bounded
// by backticks. Otherwise, `` will be treated as the start of a code block
// and confuse the link extractor.
Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-ad/amp-ad.md
Expand Up @@ -151,7 +151,7 @@ The `content` attribute of the meta tag is the absolute URL to your copy of the
Iframes should also enforce that they are only iframed into origins that they expect to be iframed into. The origins would be:

- your own origins
- https://cdn.ampproject.org for the AMP cache
- `https://cdn.ampproject.org` for the AMP cache

In the case of the AMP cache you also need to check that the "source origin" (origin of the document served by cdn.ampproject.org) is one of your origins.

Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-dailymotion/amp-dailymotion.md
Expand Up @@ -120,7 +120,7 @@ Keys and values will be URI encoded.

* `data-param-origin="example.com"`

Please read [Dailymotion's video player documentation](https://developer.dailymotion.com/player#player-parameters) to know more about parameters and options.
Please read [Dailymotion\'s video player documentation](https://developer.dailymotion.com/player#player-parameters) to know more about parameters and options.

##### common attributes

Expand Down
4 changes: 2 additions & 2 deletions tools/experiments/README.md
Expand Up @@ -6,11 +6,11 @@ Developers and users can opt-in into these features before they are fully releas

## Enable an experiment for yourself

Experimental components can be served from [https://cdn.ampproject.org](https://cdn.ampproject.org) or any other domain.
Experimental components can be served from `https://cdn.ampproject.org` or any other domain.

### Served from cdn.ampproject.org

For content served from [https://cdn.ampproject.org](https://cdn.ampproject.org), go to the [AMP experiments page](https://cdn.ampproject.org/experiments.html) and enable (or disable) any experimental component by toggling them on (or off). Opting in will set a cookie on your browser that will enable the experiment on all AMP pages served through the Google AMP Cache.
For content served from `https://cdn.ampproject.org`, go to the [AMP experiments page](https://cdn.ampproject.org/experiments.html) and enable (or disable) any experimental component by toggling them on (or off). Opting in will set a cookie on your browser that will enable the experiment on all AMP pages served through the Google AMP Cache.

### Served from other domains

Expand Down