Skip to content

Commit

Permalink
fix #7243 ignore cookieconsent cookie changes (#7268)
Browse files Browse the repository at this point in the history
  • Loading branch information
moellep authored Sep 19, 2024
1 parent 94851a3 commit c511eed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sirepo/package_data/static/js/sirepo-common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

// Common code shared between the landing page app and the various sirepo apps
SIREPO.cookieConsentName = 'sr_cookieconsent';

window.cookieconsent.initialise({
//TODO(pjm): set cookie domain?
Expand All @@ -11,7 +12,7 @@ window.cookieconsent.initialise({
link: null,
},
cookie: {
name: 'sr_cookieconsent',
name: SIREPO.cookieConsentName,
},
palette: {
popup: {
Expand Down
2 changes: 1 addition & 1 deletion sirepo/package_data/static/js/sirepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2751,7 +2751,7 @@ SIREPO.app.factory('msgRouter', ($http, $interval, $q, $window, errorService, ur
const c = cookiesSorted;
_saveCookies();
// first time is null, and reordering is ok
if (c === null || c === cookiesSorted) {
if (c === null || c === cookiesSorted.replace(`; ${SIREPO.cookieConsentName}=dismiss`, '')) {
return false;
}
srlog("cookies changed via another browser tab, reloading application");
Expand Down

0 comments on commit c511eed

Please sign in to comment.