Please add this to the documentation
bishopZ opened this issue · 3 comments
bishopZ commented
I kept getting this error.
Failed to prune sessions: no pg_hba.conf entry for host "<bad_ip_address>", user "<correct_user_name>", database "<correct_db_name>", SSL off
It turns out I was placing the connection string and connection object in the wrong place in the config. I don't think the solution is clear from the documentation.
I was trying to do this.
server.use(session({
store: new pgStore(),
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
conString: process.env.DATABASE_URL,
cookie: { maxAge: 30 * 24 * 60 * 60 * 1000 } // 30 days
}));
I finally found the correct place to put the conString on Stack.
https://stackoverflow.com/questions/39124709/can-i-configure-connect-pg-simple-to-have-ssl-on
voxpelli commented
Right, would you mind doing a PR with suggested improvements of the docs? 😊
relativityboy commented
@bishopZ - you should do that.
relativityboy commented
@voxpelli - thanks for maintaining!