MCPcopy Create free account
hub / github.com/ampproject/amphtml / getProxySafeDomain

Function getProxySafeDomain

ads/google/a4a/cookie-utils.js:19–21  ·  view source on GitHub ↗

* Returns the given domain if the current origin is not the AMP proxy origin, * otherwise returns the empty string. * * On proxy origin, we want cookies to be partitioned by subdomain to prevent * sharing across unrelated publishers, in which case we want to set the domain * equal to the empty

(win, domain)

Source from the content-addressed store, hash-verified

17 * @return {string}
18 */
19function getProxySafeDomain(win, domain) {
20 return isProxyOrigin(win.location) ? '' : domain;
21}
22
23/**
24 * @param {!Window} win

Callers 2

Calls 1

isProxyOriginFunction · 0.90

Tested by

no test coverage detected