Skip to content

Commit

Permalink
fix: use sameSite = strict for the consent cookie
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
fabianpimminger committed Apr 23, 2022
1 parent 63094f6 commit 17d716d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export const setCookie = function(cookie, data) {
name = data.cookie_name;
}

let options = {};
let options = {sameSite: "strict"};
if(data.cookie_expiration !== undefined && data.cookie_expiration !== ""){
options.expires = parseInt(data.cookie_expiration);
}

if(data.cookie_domain !== undefined && data.cookie_domain !== ""){
options.domain = parseInt(data.cookie_expiration);
}

Cookies.set(name, cookie, options);
}

Expand Down

0 comments on commit 17d716d

Please sign in to comment.