mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 16:06:01 +00:00
Merge branch 'master' of https://github.com/dbgate/dbgate
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user