PostgreSQL连接的SSL SSL [英] SSL for PostgreSQL connection nodejs
本文介绍了PostgreSQL连接的SSL SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试连接到我的Heroku PostgreSQL数据库,并且不断收到SSL错误。有没有人知道如何在连接字符串中启用SSL?
I am trying to connect to my Heroku PostgreSQL DB and I keep getting an SSL error. Does anyone have an idea on how to enable SSL in the connection string?
postgres://user:pass@host:port/database;
曾经在各处寻找它,但它似乎并不是一个很受欢迎的话题。
顺便说一下,我正在运行Nodejs和具有连接池连接方法的node-pg模块:
Been looking for it everywhere but it does not seem to be a very popular topic. By the way, I am running Nodejs and the node-pg module with its connection-pooled method:
pg.connect(connString, function(err, client, done) {
// Should work.
});
非常感谢您的评论。
推荐答案
您可以这样实现:
postgres://user:pass@host:port/database?ssl=true
这篇关于PostgreSQL连接的SSL SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文