Skip to content

Commit

Permalink
Fix: SameSite
Browse files Browse the repository at this point in the history
  • Loading branch information
luciobenini committed Mar 5, 2021
1 parent 3e67fac commit a7cfcb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gatsby-ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const onRenderBody = ({ setHeadComponents }, { cookie, code, debug }) =>
dangerouslySetInnerHTML={{
__html: `
function allowCookie(category,value){
document.cookie="${cookie}-"+category+"="+(value?"true":"false")+"; path=/";
document.cookie="${cookie}-"+category+"="+(value?"true":"false")+"; path=/; SameSite=Strict";
document.dispatchEvent(new CustomEvent('consentchange',{detail:{category:category,allowed:value}}));
}
var cpm={onAllow:function(category){allowCookie(category,true);},onDeny:function(category){allowCookie(category,false);}};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@pittica/gatsby-plugin-cookiehub",
"private": false,
"description": "CookieHub plugin for GatsbyJS.",
"version": "1.0.1",
"version": "1.0.2",
"author": {
"name": "Lucio Benini",
"email": "[email protected]",
Expand Down

0 comments on commit a7cfcb8

Please sign in to comment.