Skip to content

Commit

Permalink
Don't set Cookie to Secure if not using https
Browse files Browse the repository at this point in the history
  • Loading branch information
cigamit committed Dec 9, 2024
1 parent 257df95 commit fa72f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,7 @@ function checkForLogout(data) {
}

function setCactiTabCookie() {
document.cookie = 'CactiTab=' + sessionStorage.tab + '; SameSite=None; Max-Age: -1; Secure; Path=' + urlPath;
document.cookie = 'CactiTab=' + sessionStorage.tab + '; Max-Age: -1;' + (window.location.protocol === 'https:' ? ' SameSite=None; Secure;' : ' SameSite=Strict;') +' Path=' + urlPath;
}

function checkForRedirects(data, href) {
Expand Down

0 comments on commit fa72f83

Please sign in to comment.