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.
Files changed (3) hide show
  1. package/client.js +2 -1
  2. package/package.json +1 -1
  3. 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
- document.cookie = key + '=' + val + '; Expires=21 Oct 2025 00:0:00 GMT;'
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "statebus",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "Synchronize state.",
5
5
  "main": "statebus.js",
6
6
  "scripts": {
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
- + '; Expires=21 Oct 2025 00:0:00 GMT;')
111
+ + '; max-age=34560000;')
111
112
  }
112
113
  next()
113
114
  })