mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 07:09:02 +02:00
Read cookie session length from settings file
This commit is contained in:
@@ -34,9 +34,6 @@ else
|
||||
|
||||
app = express()
|
||||
|
||||
cookieKey = Settings.cookieName
|
||||
cookieSessionLength = 5 * oneDayInMilliseconds
|
||||
|
||||
csrf = express.csrf()
|
||||
ignoreCsrfRoutes = []
|
||||
app.ignoreCsrf = (method, route) ->
|
||||
@@ -59,10 +56,10 @@ app.configure () ->
|
||||
proxy: Settings.behindProxy
|
||||
cookie:
|
||||
domain: Settings.cookieDomain
|
||||
maxAge: cookieSessionLength
|
||||
maxAge: Settings.cookieSessionLength
|
||||
secure: Settings.secureCookie
|
||||
store: sessionStore
|
||||
key: cookieKey
|
||||
key: Settings.cookieName
|
||||
|
||||
# Measure expiry from last request, not last login
|
||||
app.use (req, res, next) ->
|
||||
|
||||
@@ -229,6 +229,9 @@ module.exports =
|
||||
# then set this to true to allow it to correctly detect the forwarded IP
|
||||
# address and http/https protocol information.
|
||||
behindProxy: false
|
||||
|
||||
# Cookie max age (in milliseconds). Set to false for a browser session.
|
||||
cookieSessionLength: 5 * 24 * 60 * 60 * 1000 # 5 days
|
||||
|
||||
# Internal configs
|
||||
# ----------------
|
||||
|
||||
Reference in New Issue
Block a user