mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +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 sslKey = config.getEnv('database.postgresdb.ssl.key');
|
||||||
const sslRejectUnauthorized = config.getEnv('database.postgresdb.ssl.rejectUnauthorized');
|
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) {
|
if (sslCa !== '' || sslCert !== '' || sslKey !== '' || !sslRejectUnauthorized) {
|
||||||
ssl = {
|
ssl = {
|
||||||
ca: sslCa || undefined,
|
ca: sslCa || undefined,
|
||||||
|
|||||||
@@ -92,6 +92,12 @@ export const schema = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
ssl: {
|
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: {
|
ca: {
|
||||||
doc: 'SSL certificate authority',
|
doc: 'SSL certificate authority',
|
||||||
format: String,
|
format: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user