mirror of https://github.com/buster-so/buster.git
posgres ssl fix
This commit is contained in:
parent
2e24d830f0
commit
570624a112
|
@ -49,7 +49,12 @@ export class PostgreSQLAdapter extends BaseAdapter {
|
|||
};
|
||||
|
||||
// Handle SSL configuration - default to true for security
|
||||
config.ssl = pgCredentials.ssl ?? true;
|
||||
// But allow self-signed certificates to avoid connection errors
|
||||
if (pgCredentials.ssl !== false) {
|
||||
config.ssl = pgCredentials.ssl === true || pgCredentials.ssl === undefined
|
||||
? { rejectUnauthorized: false } // Allow self-signed certificates
|
||||
: pgCredentials.ssl; // Use custom SSL config if provided
|
||||
}
|
||||
|
||||
// Handle connection timeout
|
||||
if (pgCredentials.connection_timeout) {
|
||||
|
|
Loading…
Reference in New Issue