Skip to content

Commit

Permalink
Don't set a Y-cookie for GET requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jun 20, 2024
1 parent ebc8eb4 commit 25786f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/yahrzeit.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export async function yahrzeitApp(ctx) {
}
}
ctx.status = 200;
setYahrzeitCookie(ctx);
if (ctx.state.showDownload) {
setYahrzeitCookie(ctx);
}
await makeDownloadProps(ctx);
}
} else {
Expand Down Expand Up @@ -174,10 +176,11 @@ async function getCalPickerIds(ctx, ids) {
}

function setYahrzeitCookie(ctx) {
const cCookie = ctx.cookies.get('C');
if (ctx.state.yahrzeitCookieSet) {
return false;
} else if (cCookie === 'opt_out') {
}
const cCookie = ctx.cookies.get('C');
if (cCookie === 'opt_out') {
return false;
}
const yahrzeitCookie = ctx.cookies.get('Y');
Expand Down

0 comments on commit 25786f5

Please sign in to comment.