mirror of
https://github.com/mastodon/mastodon.git
synced 2025-01-08 19:35:11 +01:00
Use 'prefer' as the default value for DB_SSLMODE in the streaming API configuration
This commit is contained in:
parent
a021dee642
commit
66e690d13e
@ -82,20 +82,18 @@ export function configFromEnv(env, environment) {
|
|||||||
} else if (Object.hasOwn(pgConfigs, environment)) {
|
} else if (Object.hasOwn(pgConfigs, environment)) {
|
||||||
baseConfig = pgConfigs[environment];
|
baseConfig = pgConfigs[environment];
|
||||||
|
|
||||||
if (env.DB_SSLMODE) {
|
|
||||||
switch(env.DB_SSLMODE) {
|
switch(env.DB_SSLMODE) {
|
||||||
case 'disable':
|
case 'disable':
|
||||||
case '':
|
|
||||||
baseConfig.ssl = false;
|
baseConfig.ssl = false;
|
||||||
break;
|
break;
|
||||||
case 'no-verify':
|
case 'no-verify':
|
||||||
baseConfig.ssl = { rejectUnauthorized: false };
|
baseConfig.ssl = { rejectUnauthorized: false };
|
||||||
break;
|
break;
|
||||||
|
case 'prefer':
|
||||||
default:
|
default:
|
||||||
baseConfig.ssl = {};
|
baseConfig.ssl = {};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Unable to resolve postgresql database configuration.');
|
throw new Error('Unable to resolve postgresql database configuration.');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user