mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Read cookie session length from settings file
This commit is contained in:
parent
5f6bdaf700
commit
8b4ccae60a
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
# ----------------
|
||||
|
|
Loading…
Reference in a new issue