Closed leomayleomay closed 4 years ago
just I could achieve the same with export PGSSLMODE=require
Hi,
Thanks for this proposition.
It seems that node-postgres supports ssl :: Boolean
option for this kind of configuration:
It would be nice to have it (I think we want to have ssl :: Maybe Boolean
) because we want to preserve possibility to use default value on the pg level.
On the other hand it seems that postgresql supports more options here then there is on the node-postgres
side:
https://www.postgresql.org/docs/9.3/libpq-connect.html#LIBPQ-CONNECT-SSLMODE
This leaves an open question if we want to really parse connection uri on our side like it is done now...
This PR is to add
sslmode
to connection config so that the user of the package could specifysslmode=require
as described in https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku#ssl