This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/inc/session.coffee
2018-12-27 12:19:19 +01:00

22 lines
469 B
CoffeeScript

# node libraries
expressSession = (require 'express-session')
RedisStore = (require 'connect-redis')(expressSession)
module.exports = (app) ->
session =
secret: 'keyboard cat'
store: new RedisStore
host: 'redis'
port: 6379
cookie:
httpOnly: true
sameSite: 'strict'
proxy: true
resave: true
saveUninitialized: true
if app.get 'env' == 'production'
app.set 'trust proxy', 1
session.cookie.secure = true
expressSession session