mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 12:13:57 +00:00
Merge branch 'master' of https://github.com/dbgate/dbgate
This commit is contained in:
commit
fd2a35fb4a
@ -37,8 +37,8 @@ async function loadConnection(driver, storedConnection, connectionMode) {
|
||||
|
||||
if (allowConnectionFromEnvVariables) {
|
||||
return _.mapValues(storedConnection, (value, key) => {
|
||||
if (_.isString(value) && value.startsWith('$')) {
|
||||
return process.env[value.substring(1)];
|
||||
if (_.isString(value) && value.startsWith('${') && value.endsWith('}')) {
|
||||
return process.env[value.slice(2, -1)];
|
||||
}
|
||||
return value;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user