statebus 6.2.1 → 6.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +2 -1
- package/package.json +1 -1
- package/server.js +2 -1
package/client.js
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
// ****************
|
|
15
15
|
// Connecting over the Network
|
|
16
16
|
function set_cookie (key, val) {
|
|
17
|
-
|
|
17
|
+
// max-age is 400 days, the max allowed in chrome now
|
|
18
|
+
document.cookie = key + '=' + val + '; max-age=34560000;'
|
|
18
19
|
}
|
|
19
20
|
function get_cookie (key) {
|
|
20
21
|
var c = document.cookie.match('(^|;)\\s*' + key + '\\s*=\\s*([^;]+)');
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -106,8 +106,9 @@ function import_server (bus, options)
|
|
|
106
106
|
+ Math.random().toString(36).substring(2)
|
|
107
107
|
+ Math.random().toString(36).substring(2))
|
|
108
108
|
|
|
109
|
+
// max-age is 400 days, the max allowed in chrome now
|
|
109
110
|
res.setHeader('Set-Cookie', 'client=' + req.client
|
|
110
|
-
+ ';
|
|
111
|
+
+ '; max-age=34560000;')
|
|
111
112
|
}
|
|
112
113
|
next()
|
|
113
114
|
})
|