Skip to content

Commit 0fcb8f9

Browse files
fix: strapi session and reverse proxy (#90)
1 parent f3adc19 commit 0fcb8f9

File tree

3 files changed

+14
-42
lines changed

3 files changed

+14
-42
lines changed

apps/cms/config/admin.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
export default ({ env }) => ({
22
auth: {
33
secret: env('ADMIN_JWT_SECRET'),
4+
// The 'sessions' object replaces the deprecated 'options.expiresIn'
5+
sessions: {
6+
// maxSessionLifespan is the absolute maximum time a session can be valid for.
7+
// It is expressed in seconds. Default is 7 days.
8+
maxSessionLifespan: 60 * 60 * 24 * 7, // 7 days in seconds
9+
// maxRefreshTokenLifespan is the maximum time a refresh token can be used to get a new session.
10+
// It is expressed in seconds. Default is 30 days.
11+
maxRefreshTokenLifespan: 60 * 60 * 24 * 30, // 30 days in seconds
12+
},
413
},
514
apiToken: {
615
salt: env('API_TOKEN_SALT'),

apps/cms/config/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export default ({ env }) => ({
22
host: env('HOST', '0.0.0.0'),
33
port: env.int('PORT', 1337),
4+
proxy: true,
45
app: {
56
keys: env.array('APP_KEYS'),
67
},

apps/cms/pnpm-lock.yaml

Lines changed: 4 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)