mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
fix(core): Add an option to enable postgres ssl with default certs (#6889)
CP-809
This commit is contained in:
committed by
GitHub
parent
b3247e5935
commit
789e1e7ed4
@@ -90,7 +90,7 @@ export function getConnectionOptions(dbType: DatabaseType): ConnectionOptions {
|
||||
const sslKey = config.getEnv('database.postgresdb.ssl.key');
|
||||
const sslRejectUnauthorized = config.getEnv('database.postgresdb.ssl.rejectUnauthorized');
|
||||
|
||||
let ssl: TlsOptions | undefined;
|
||||
let ssl: TlsOptions | boolean = config.getEnv('database.postgresdb.ssl.enabled');
|
||||
if (sslCa !== '' || sslCert !== '' || sslKey !== '' || !sslRejectUnauthorized) {
|
||||
ssl = {
|
||||
ca: sslCa || undefined,
|
||||
|
||||
@@ -92,6 +92,12 @@ export const schema = {
|
||||
},
|
||||
|
||||
ssl: {
|
||||
enabled: {
|
||||
doc: 'If SSL should be enabled. If `ca`, `cert`, or `key` are defined, this will automatically default to true',
|
||||
format: 'Boolean',
|
||||
default: false,
|
||||
env: 'DB_POSTGRESDB_SSL_ENABLED',
|
||||
},
|
||||
ca: {
|
||||
doc: 'SSL certificate authority',
|
||||
format: String,
|
||||
|
||||
Reference in New Issue
Block a user