Skip to content

Commit

Permalink
set cookie on .bitrise.io
Browse files Browse the repository at this point in the history
  • Loading branch information
aorcsik committed Feb 20, 2024
1 parent 855b019 commit 10ff51d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ if (cookieMatch) lastVisitedDate = new Date(cookieMatch[1]);

const expires = new Date();
expires.setMonth(expires.getMonth() + 12);
document.cookie = `${cookieName}=${now};expires=${expires};`;
let domain = '.bitrise.io';
if (window.location.host.match('localhost')) domain = 'localhost';
document.cookie = `${cookieName}=${now};expires=${expires};domain=${domain};`;

const url = new URL(document.location.href);
const queryLastVisit = url.searchParams.get("lastVisit");
Expand Down

0 comments on commit 10ff51d

Please sign in to comment.