Skip to content

Commit

Permalink
new dist version with secure cookies option
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeisen committed Mar 4, 2019
1 parent a1c25cf commit a8b6c6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions dist/breinify-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12438,7 +12438,7 @@ dependencyScope.jQuery = $;;
this.set(name, '', -1, true, specDomain);
},

set: function (name, value, expiresInDays, global, specDomain) {
set: function (name, value, expiresInDays, global, specDomain, httpsOnly) {

var expires;
if (typeof expiresInDays === 'number') {
Expand All @@ -12456,8 +12456,15 @@ dependencyScope.jQuery = $;;
domain = '';
}

var secure;
if (httpsOnly === true) {
secure = '; secure';
} else {
secure = '';
}

var path = global === true ? '; path=/' : '';
document.cookie = name + '=' + value + expires + domain + path;
document.cookie = name + '=' + value + expires + domain + path + secure;
},

get: function (name) {
Expand Down
Loading

0 comments on commit a8b6c6b

Please sign in to comment.