Fix streaming server refusing unix socket path in DATABASE_URL
(#34091)
This commit is contained in:
parent
d8ba2fa431
commit
6a672ec227
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ export function configFromEnv(env, environment) {
|
||||||
if (typeof parsedUrl.password === 'string') baseConfig.password = parsedUrl.password;
|
if (typeof parsedUrl.password === 'string') baseConfig.password = parsedUrl.password;
|
||||||
if (typeof parsedUrl.host === 'string') baseConfig.host = parsedUrl.host;
|
if (typeof parsedUrl.host === 'string') baseConfig.host = parsedUrl.host;
|
||||||
if (typeof parsedUrl.user === 'string') baseConfig.user = parsedUrl.user;
|
if (typeof parsedUrl.user === 'string') baseConfig.user = parsedUrl.user;
|
||||||
if (typeof parsedUrl.port === 'string') {
|
if (typeof parsedUrl.port === 'string' && parsedUrl.port) {
|
||||||
const parsedPort = parseInt(parsedUrl.port, 10);
|
const parsedPort = parseInt(parsedUrl.port, 10);
|
||||||
if (isNaN(parsedPort)) {
|
if (isNaN(parsedPort)) {
|
||||||
throw new Error('Invalid port specified in DATABASE_URL environment variable');
|
throw new Error('Invalid port specified in DATABASE_URL environment variable');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue