Skip to content

Commit a8b6c6b

Browse files
committed
new dist version with secure cookies option
1 parent a1c25cf commit a8b6c6b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

dist/breinify-api.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12438,7 +12438,7 @@ dependencyScope.jQuery = $;;
1243812438
this.set(name, '', -1, true, specDomain);
1243912439
},
1244012440

12441-
set: function (name, value, expiresInDays, global, specDomain) {
12441+
set: function (name, value, expiresInDays, global, specDomain, httpsOnly) {
1244212442

1244312443
var expires;
1244412444
if (typeof expiresInDays === 'number') {
@@ -12456,8 +12456,15 @@ dependencyScope.jQuery = $;;
1245612456
domain = '';
1245712457
}
1245812458

12459+
var secure;
12460+
if (httpsOnly === true) {
12461+
secure = '; secure';
12462+
} else {
12463+
secure = '';
12464+
}
12465+
1245912466
var path = global === true ? '; path=/' : '';
12460-
document.cookie = name + '=' + value + expires + domain + path;
12467+
document.cookie = name + '=' + value + expires + domain + path + secure;
1246112468
},
1246212469

1246312470
get: function (name) {

0 commit comments

Comments
 (0)