@@ -102,9 +102,25 @@ default value when applicable.
102
102
103
103
When applicable, "PG" environment variables used by _ libpq_ apply, see
104
104
the PostgreSQL documentation on [ environment
105
- variables] ( https://www.postgresql.org/docs/current/libpq-envars.html ) . In
106
- particular, to disable the use of SSL, you can define the environment
107
- variable "PGSSLMODE" as "disable".
105
+ variables] ( https://www.postgresql.org/docs/current/libpq-envars.html ) .
106
+
107
+ #### SSL/TLS configuration
108
+
109
+ As shown in the configuration options table in the previous section,
110
+ the default behavior is to _ prefer_ making a secure connection. That
111
+ is, if the database has SSL/TLS configured, then the client will
112
+ either make a secure connection or not connect at all.
113
+
114
+ For a self-signed certificate or a certificate that's not verifiable
115
+ by the system certificates, either provide the signing certificate
116
+ using the ` NODE_EXTRA_CA_CERTS ` environment variable, or disable
117
+ SSL/TLS altogether using ` SSLMode.Disable ` or the environment variable
118
+ ` PGSSLMODE=disable ` .
119
+
120
+ Note that _ libpq_ supports a number of additional [ SSL/TLS connection
121
+ modes] ( https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-SSLMODE )
122
+ but most of them do not sit well with Node's [ tls
123
+ module] ( https://nodejs.org/api/tls.html ) and are not offered here.
108
124
109
125
### Querying
110
126
0 commit comments