Skip to content

Commit 7c356ea

Browse files
authored
Fix google cookie expiration date setting. (#40452)
1 parent 0b0cfb4 commit 7c356ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ads/google/a4a/cookie-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function maybeSetCookieFromAdResponse(win, fetchResponse) {
4646
// On proxy origin, we want cookies to be partitioned by subdomain to
4747
// prevent sharing across unrelated publishers, so we don't set a domain.
4848
const domain = getProxySafeDomain(win, cookieInfo['domain']);
49-
const expiration = Math.max(cookieInfo['expiration'], 0);
49+
const expiration = Math.max(cookieInfo['expires'], 0);
5050
setCookie(win, cookieName, value, expiration, {
5151
domain,
5252
secure: false,

ads/google/a4a/test/test-cookie-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ describes.fakeWin('#maybeSetCookieFromAdResponse', {amp: true}, (env) => {
2424
'version': 1,
2525
'value': 'val1',
2626
'domain': 'foo.com',
27-
'expiration': Date.now() + 100_000,
27+
'expires': Date.now() + 100_000,
2828
},
2929
{
3030
'version': 2,
3131
'value': 'val2',
3232
'domain': 'foo.com',
33-
'expiration': Date.now() + 100_000,
33+
'expires': Date.now() + 100_000,
3434
},
3535
],
3636
});

0 commit comments

Comments
 (0)