@cloudron/tegel 1.1.1 → 1.1.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/index.js +4 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
+
import fs from 'node:fs';
|
|
2
3
|
import session from 'express-session';
|
|
3
4
|
import FileStoreFactory from 'session-file-store';
|
|
4
5
|
import lastMile from '@cloudron/connect-lastmile';
|
|
@@ -17,10 +18,12 @@ export async function createExpressApp({ sessionSecret = 'changeme', oidcConfig
|
|
|
17
18
|
app.use(express.json());
|
|
18
19
|
|
|
19
20
|
const FileStore = FileStoreFactory(session);
|
|
21
|
+
const sessionStorePath = process.env.CLOUDRON ? '/app/data/.session.store' : '/tmp/session.store';
|
|
22
|
+
fs.mkdirSync(sessionStorePath, { recursive: true });
|
|
20
23
|
|
|
21
24
|
app.use(session({
|
|
22
25
|
secret: sessionSecret,
|
|
23
|
-
store: new FileStore({ path:
|
|
26
|
+
store: new FileStore({ path: sessionStorePath }),
|
|
24
27
|
resave: false,
|
|
25
28
|
saveUninitialized: false,
|
|
26
29
|
cookie: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudron/tegel",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "GPL-2.0",
|
|
6
6
|
"author": "Cloudron Developers",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"@cloudron/connect-lastmile": "^2.3.0",
|
|
16
16
|
"express": "^5.2.1",
|
|
17
17
|
"express-session": "^1.19.0",
|
|
18
|
-
"openid-client": "^6.8.
|
|
18
|
+
"openid-client": "^6.8.2",
|
|
19
19
|
"session-file-store": "^1.5.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@eslint/js": "^
|
|
23
|
-
"eslint": "^
|
|
22
|
+
"@eslint/js": "^10.0.1",
|
|
23
|
+
"eslint": "^10.0.0",
|
|
24
24
|
"globals": "^17.3.0"
|
|
25
25
|
}
|
|
26
26
|
}
|