Skip to content

Commit 9012b53

Browse files
authored
Custom SSL config now reads options URI correctly
1 parent fdc90a9 commit 9012b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class KeyvPostgres extends KeyvSql {
1313
// Add custom SSL configuration, if "sslmode" present in connectionString (Work around issue with self-signed certs: https://github.com/brianc/node-postgres/issues/2009)
1414
let ssl
1515
let connectionString = opts.uri
16-
const sslIndex = inputString.indexOf("sslmode")
16+
const sslIndex = opts.uri.indexOf("sslmode")
1717
if (sslIndex > 0) {
1818
connectionString = connectionString.substring(0, sslIndex - 1)
1919
ssl = { rejectUnauthorized: false }

0 commit comments

Comments
 (0)