Closed joshuakarjala closed 8 years ago
I think I'm going to add this option to the docs here that's how you use it, right? Inside the config
object.
Yes - like
var adminConfig = {
config: require('./admin-config/config'),
settings: require('./admin-config/settings.json'),
custom: require('./admin-config/custom.json'),
users: require('./admin-config/users'),
dpath: './admin-config/',
session: session({
store: new PgSession({
pg: pg,
conString: process.env.DB_CONNECTION_STRING,
tableName: 'user_sessions'
}),
secret: process.env.ADMIN_COOKIE_SECRET,
resave: false,
saveUninitialized: false,
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000 }
})
};
This allow us to use different session backends for express-admin. Primary use case is to let us use redis / pg or other storage to allow concurrent express-admin instances without CSRF errors