diff --git a/server/app.ts b/server/app.ts index b5d6535..e4b015a 100644 --- a/server/app.ts +++ b/server/app.ts @@ -8,6 +8,9 @@ import path from 'path' const port = 8085 const app: Application = express() +const host = process.env.VITE_OBP_EXPLORER_HOST +const httpsOrNot = host ? host.indexOf("https://") == 0 ? true : false : true + app.use(express.json()) app.use( session({ @@ -16,8 +19,8 @@ app.use( saveUninitialized: true, cookie: { httpOnly: true, - secure: true, - maxAge: 300*1000, // 5 minutes in milliseconds + secure: httpsOrNot, + maxAge: 10*1000, // 5 minutes in milliseconds } }) )