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

23 lines
469 B
CoffeeScript
Raw Normal View History

# node libraries
expressSession = (require 'express-session')
2018-12-16 02:02:57 +00:00
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