Skip to content

Commit

Permalink
bug: fix cookie behaviour across subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack authored and lnielsen committed Apr 2, 2024
1 parent ffd20d4 commit 1a945d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
d.setTime(d.getTime() + (365 * 24 * 60 * 60 * 1000)); // one year
var expires = "expires=" + d.toUTCString();
var cookie = cname + "=" + cvalue + ";" + expires + ";"
cookie += "path=/;SameSite=None; Secure"; // so that it works across subdomains
cookie += "Domain=zenodo.org;Path=/;SameSite=None; Secure";
document.cookie = cookie;
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
d.setTime(d.getTime() + (365 * 24 * 60 * 60 * 1000)); // one year
var expires = "expires=" + d.toUTCString();
var cookie = cname + "=" + cvalue + ";" + expires + ";"
cookie += "path=/;SameSite=None; Secure"; // so that it works across subdomains
cookie += "Domain=zenodo.org;Path=/;SameSite=None; Secure";
document.cookie = cookie;
}
</script>

0 comments on commit 1a945d1

Please sign in to comment.