Fix Postgres SSL support for existing none SSL connections

This commit is contained in:
Jan Oberhauser 2020-01-14 17:20:41 -06:00
parent fb55e5ab29
commit 03919a4c68

View file

@ -208,14 +208,12 @@ export class Postgres implements INodeType {
database: credentials.database as string, database: credentials.database as string,
user: credentials.user as string, user: credentials.user as string,
password: credentials.password as string, password: credentials.password as string,
ssl: credentials.ssl != 'disable', ssl: !['disable', undefined].includes(credentials.ssl as string | undefined),
sslmode: credentials.ssl as string sslmode: credentials.ssl as string || 'disable',
}; };
const db = pgp(config); const db = pgp(config);
//const db = pgp(`postgres://${credentials.user}:${credentials.password}@${credentials.host}:${credentials.port}/${credentials.database}`);
let returnItems = []; let returnItems = [];
const items = this.getInputData(); const items = this.getInputData();