Skip to content

Commit

Permalink
Remove deprecated Cloudflare AMP Cache and A4A support. (#26912)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliy committed Mar 10, 2020
1 parent e44a2c1 commit 6935ec5
Show file tree
Hide file tree
Showing 34 changed files with 4 additions and 1,551 deletions.
2 changes: 1 addition & 1 deletion 3p/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Review the [ads/README](../ads/README.md) for further details on ad integration.
- JavaScript can not be involved with the initiation of font loading.
- Font loading gets controlled (but not initiated) by [`<amp-font>`](https://github.com/ampproject/amphtml/issues/648).
- AMP by default does not allow inclusion of external stylesheets, but it is happy to whitelist URL prefixes of font providers for font inclusion via link tags. These link tags and their fonts must be served via HTTPS.
- If a font provider does referrer based "security" it needs to whitelist the AMP proxy origins before being included in the link tag whitelist. AMP proxy sends the appropriate referrer header such as `https://cdn.ampproject.org` and `https://amp.cloudflare.com`.
- If a font provider does referrer based "security" it needs to whitelist the AMP proxy origins before being included in the link tag whitelist. AMP proxy sends the appropriate referrer header such as `https://cdn.ampproject.org`.

# Adding proper integration tests

Expand Down
11 changes: 0 additions & 11 deletions ads/_a4a-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
* limitations under the License.
*/

import {cloudflareIsA4AEnabled} from '../extensions/amp-ad-network-cloudflare-impl/0.1/cloudflare-a4a-config';
import {gmosspIsA4AEnabled} from '../extensions/amp-ad-network-gmossp-impl/0.1/gmossp-a4a-config';
import {map} from '../src/utils/object';
import {myTargetIsA4AEnabled} from '../extensions/amp-ad-network-mytarget-impl/0.1/mytarget-a4a-config';
import {tripleliftIsA4AEnabled} from '../extensions/amp-ad-network-triplelift-impl/0.1/triplelift-a4a-config';

/**
* Registry for A4A (AMP Ads for AMPHTML pages) "is supported" predicates.
Expand All @@ -45,10 +41,6 @@ export function getA4ARegistry() {
'adsense': () => true,
'adzerk': () => true,
'doubleclick': () => true,
'triplelift': tripleliftIsA4AEnabled,
'mytarget': myTargetIsA4AEnabled,
'cloudflare': cloudflareIsA4AEnabled,
'gmossp': gmosspIsA4AEnabled,
'fake': () => true,
// TODO: Add new ad network implementation "is enabled" functions here.
// Note: if you add a function here that requires a new "import", above,
Expand All @@ -68,7 +60,4 @@ export function getA4ARegistry() {
export const signingServerURLs = {
'google': 'https://cdn.ampproject.org/amp-ad-verifying-keyset.json',
'google-dev': 'https://cdn.ampproject.org/amp-ad-verifying-keyset-dev.json',
'cloudflare': 'https://amp.cloudflare.com/amp-ad-verifying-keyset.json',
'cloudflare-dev':
'https://amp.cloudflare.com/amp-ad-verifying-keyset-dev.json',
};
43 changes: 0 additions & 43 deletions ads/dianomi.md

This file was deleted.

24 changes: 0 additions & 24 deletions build-system/compile/bundles.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,30 +292,6 @@ exports.extensionBundles = [
latestVersion: '0.1',
type: TYPES.AD,
},
{
name: 'amp-ad-network-triplelift-impl',
version: '0.1',
latestVersion: '0.1',
type: TYPES.AD,
},
{
name: 'amp-ad-network-cloudflare-impl',
version: '0.1',
latestVersion: '0.1',
type: TYPES.AD,
},
{
name: 'amp-ad-network-gmossp-impl',
version: '0.1',
latestVersion: '0.1',
type: TYPES.AD,
},
{
name: 'amp-ad-network-mytarget-impl',
version: '0.1',
latestVersion: '0.1',
type: TYPES.AD,
},
{
name: 'amp-ad-exit',
version: '0.1',
Expand Down
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/caches-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const gulp = require('gulp');
const log = require('fancy-log');
const through2 = require('through2');

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

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

Expand Down
12 changes: 0 additions & 12 deletions build-system/test-configs/dep-check-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,6 @@ exports.rules = [
mustNotDependOn: 'extensions/**/*.js',
allowlist: [
// See todo note in ads/_a4a-config.js
'ads/_a4a-config.js->' +
'extensions/amp-ad-network-triplelift-impl/0.1/triplelift-a4a-config.js',
'ads/_a4a-config.js->' +
'extensions/amp-ad-network-cloudflare-impl/0.1/cloudflare-a4a-config.js',
'ads/_a4a-config.js->' +
'extensions/amp-ad-network-gmossp-impl/0.1/gmossp-a4a-config.js',
'ads/_a4a-config.js->' +
'extensions/amp-ad-network-mytarget-impl/0.1/mytarget-a4a-config.js',
],
},
// Rules for extensions and main src.
Expand All @@ -189,14 +181,10 @@ exports.rules = [
allowlist: [
// a4a ads depend on a4a.
'extensions/amp-ad-network-fake-impl/0.1/amp-ad-network-fake-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-gmossp-impl/0.1/amp-ad-network-gmossp-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-triplelift-impl/0.1/amp-ad-network-triplelift-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-cloudflare-impl/0.1/amp-ad-network-cloudflare-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-adzerk-impl/0.1/amp-ad-network-adzerk-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-doubleclick-impl/0.1/sra-utils.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-doubleclick-impl/0.1/amp-ad-network-doubleclick-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',
'extensions/amp-ad-network-mytarget-impl/0.1/amp-ad-network-mytarget-impl.js->extensions/amp-a4a/0.1/amp-a4a.js',

// And a few mrore things depend on a4a.
'extensions/amp-ad-custom/0.1/amp-ad-custom.js->extensions/amp-a4a/0.1/amp-ad-network-base.js',
Expand Down
38 changes: 0 additions & 38 deletions examples/a4a.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,44 +53,6 @@ <h2>Fake ad network</h2>
<div fallback></div>
</amp-ad>

<h2>TripleLift ad network</h2>
<amp-ad width="297" height="410"
type="triplelift"
data-use-a4a="true"
src="https://ib.3lift.com/ttj?inv_code=ampforadstest_main_feed">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2>myTarget ad network</h2>
<amp-ad width="300" height="250"
type="mytarget"
data-use-a4a="true"
data-ad-slot="197378">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2>Fake cloudflare as ad network ad</h2>
<amp-ad width="300" height="150"
type="cloudflare"
data-cf-network="cloudflare"
data-cf-a4a="true"
src="/fake_a4a.json.html">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2>GMOSSP ad network</h2>
<amp-ad width="300" height="90"
type="gmossp"
data-use-a4a="true"
data-id="37831"
src="https://sp.gmossp-sp.jp/ads/ssp.ad?space_id=37831&is_a4a=1">
<div placeholder></div>
<div fallback></div>
</amp-ad>

<h2>Regular ad</h2>
<amp-ad data-slot="/30497360/a4a/non_a4a_native"
height="250"
Expand Down

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions extensions/amp-ad-network-cloudflare-impl/0.1/data/fake_a4a.html

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6935ec5

Please sign in to comment.