We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23942ea commit b75d885Copy full SHA for b75d885
ads/google/a4a/cookie-utils.js
@@ -1,4 +1,4 @@
1
-import {setCookie} from 'src/cookies';
+import {canSetCookie, setCookie} from 'src/cookies';
2
import {isProxyOrigin} from 'src/url';
3
4
/** @type {string} */
@@ -25,7 +25,10 @@ function getProxySafeDomain(win, domain) {
25
* @param {!Response} fetchResponse
26
*/
27
export function maybeSetCookieFromAdResponse(win, fetchResponse) {
28
- if (!fetchResponse.headers.has(AMP_GFP_SET_COOKIES_HEADER_NAME)) {
+ if (
29
+ !fetchResponse.headers.has(AMP_GFP_SET_COOKIES_HEADER_NAME) ||
30
+ !canSetCookie(win)
31
+ ) {
32
return;
33
}
34
let cookiesToSet = /** @type {!Array<!Object>} */ [];
0 commit comments