@live-change/server 0.8.20 → 0.8.22
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/lib/SsrServer.js +4 -1
- package/package.json +7 -7
package/lib/SsrServer.js
CHANGED
|
@@ -90,11 +90,14 @@ class SsrServer {
|
|
|
90
90
|
const writeCredentials = this.settings.writeCredentials || ((res, credentials) => {
|
|
91
91
|
//console.log("WRITE CREDENTIALS", credentials)
|
|
92
92
|
const cookieExpireDate =
|
|
93
|
-
this.settings.
|
|
93
|
+
this.settings.sessionCookieExpire
|
|
94
|
+
? new Date(Date.now() + this.settings.sessionCookieExpire * 1000).toUTCString()
|
|
95
|
+
: null
|
|
94
96
|
if(credentials.sessionKey) {
|
|
95
97
|
res.set({
|
|
96
98
|
'Set-Cookie': `sessionKey=${credentials.sessionKey}; Path=/; HttpOnly`
|
|
97
99
|
+ (cookieExpireDate ? `; Expires=${cookieExpireDate}` : '')
|
|
100
|
+
+ (this.settings.sessionCookieDomain ? `; Domain=${this.settings.sessionCookieDomain}` : '')
|
|
98
101
|
})
|
|
99
102
|
}
|
|
100
103
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.22",
|
|
4
4
|
"description": "Live Change Framework - server",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"homepage": "https://github.com/live-change/live-change-stack",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/dao": "^0.8.
|
|
26
|
-
"@live-change/dao-sockjs": "^0.8.
|
|
27
|
-
"@live-change/db-server": "^0.8.
|
|
28
|
-
"@live-change/framework": "^0.8.
|
|
25
|
+
"@live-change/dao": "^0.8.22",
|
|
26
|
+
"@live-change/dao-sockjs": "^0.8.22",
|
|
27
|
+
"@live-change/db-server": "^0.8.22",
|
|
28
|
+
"@live-change/framework": "^0.8.22",
|
|
29
29
|
"@live-change/sockjs": "0.4.1",
|
|
30
|
-
"@live-change/uid": "^0.8.
|
|
30
|
+
"@live-change/uid": "^0.8.22",
|
|
31
31
|
"dotenv": "^16.4.4",
|
|
32
32
|
"express": "^4.18.2",
|
|
33
33
|
"express-static-gzip": "2.1.7",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"websocket": "^1.0.34",
|
|
40
40
|
"yargs": "^17.7.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "70a56ac3dc54167a2d32ce47a00150e7a94bd04d"
|
|
43
43
|
}
|