pg-connection-string
Advanced tools
Comparing version 2.3.0 to 2.4.0
19
index.js
@@ -68,3 +68,3 @@ 'use strict' | ||
if (config.sslcert || config.sslkey || config.sslrootcert) { | ||
if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) { | ||
config.ssl = {} | ||
@@ -85,2 +85,19 @@ } | ||
switch (config.sslmode) { | ||
case 'disable': { | ||
config.ssl = false | ||
break | ||
} | ||
case 'prefer': | ||
case 'require': | ||
case 'verify-ca': | ||
case 'verify-full': { | ||
break | ||
} | ||
case 'no-verify': { | ||
config.ssl.rejectUnauthorized = false | ||
break | ||
} | ||
} | ||
return config | ||
@@ -87,0 +104,0 @@ } |
{ | ||
"name": "pg-connection-string", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Functions for dealing with a PostgresSQL connection string", | ||
@@ -25,5 +25,5 @@ "main": "./index.js", | ||
"bugs": { | ||
"url": "https://github.com/iceddev/pg-connection-string/issues" | ||
"url": "https://github.com/brianc/node-postgres/issues" | ||
}, | ||
"homepage": "https://github.com/iceddev/pg-connection-string", | ||
"homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string", | ||
"devDependencies": { | ||
@@ -38,3 +38,4 @@ "chai": "^4.1.1", | ||
"index.d.ts" | ||
] | ||
], | ||
"gitHead": "7ffe68eba056b9a6d0fa88f928aa85e768c28838" | ||
} |
8439
102