|
|
@ -317,7 +317,8 @@ export default class NcConfigFactory implements NcConfig { |
|
|
|
client: url.protocol.replace(':', ''), |
|
|
|
client: url.protocol.replace(':', ''), |
|
|
|
connection: { |
|
|
|
connection: { |
|
|
|
...defaultConnectionConfig, |
|
|
|
...defaultConnectionConfig, |
|
|
|
...parsedQuery |
|
|
|
...parsedQuery, |
|
|
|
|
|
|
|
host: url.hostname |
|
|
|
}, |
|
|
|
}, |
|
|
|
acquireConnectionTimeout: 600000, |
|
|
|
acquireConnectionTimeout: 600000, |
|
|
|
...(url.searchParams.has('search_path') |
|
|
|
...(url.searchParams.has('search_path') |
|
|
@ -658,9 +659,9 @@ export default class NcConfigFactory implements NcConfig { |
|
|
|
|
|
|
|
|
|
|
|
if (rtConfig) { |
|
|
|
if (rtConfig) { |
|
|
|
const { driver, ...connectionConfig } = parsedConfig; |
|
|
|
const { driver, ...connectionConfig } = parsedConfig; |
|
|
|
|
|
|
|
|
|
|
|
const client = driverClientMapping[driver] || driver; |
|
|
|
const client = driverClientMapping[driver] || driver; |
|
|
|
|
|
|
|
|
|
|
|
const avoidSSL = ['localhost', '127.0.0.1', 'host.docker.internal', '172.17. 0.1'] |
|
|
|
const avoidSSL = ['localhost', '127.0.0.1', 'host.docker.internal', '172.17. 0.1'] |
|
|
|
|
|
|
|
|
|
|
|
if (client === 'pg' && !connectionConfig?.ssl && !avoidSSL.includes(connectionConfig.host)) { |
|
|
|
if (client === 'pg' && !connectionConfig?.ssl && !avoidSSL.includes(connectionConfig.host)) { |
|
|
|