fixed bug when tunnel tokens not defined in config
This commit is contained in:
parent
363620d7fb
commit
3bd9bac390
|
@ -173,18 +173,21 @@ module.exports.create = function (deps, config) {
|
||||||
return activeTunnels[data.tunnelUrl].clear(data.jwt);
|
return activeTunnels[data.tunnelUrl].clear(data.jwt);
|
||||||
}
|
}
|
||||||
|
|
||||||
var confTokens = config.tunnel;
|
if (config.tunnel) {
|
||||||
if (typeof confTokens === 'string') {
|
var confTokens = config.tunnel;
|
||||||
confTokens = confTokens.split(',');
|
if (typeof confTokens === 'string') {
|
||||||
}
|
confTokens = confTokens.split(',');
|
||||||
confTokens.forEach(function (jwt) {
|
|
||||||
if (typeof jwt === 'object') {
|
|
||||||
jwt.owner = 'config';
|
|
||||||
addToken(jwt);
|
|
||||||
} else {
|
|
||||||
addToken({ jwt: jwt, owner: 'config' });
|
|
||||||
}
|
}
|
||||||
});
|
confTokens.forEach(function (jwt) {
|
||||||
|
if (typeof jwt === 'object') {
|
||||||
|
jwt.owner = 'config';
|
||||||
|
addToken(jwt);
|
||||||
|
} else {
|
||||||
|
addToken({ jwt: jwt, owner: 'config' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
storage.all().then(function (stored) {
|
storage.all().then(function (stored) {
|
||||||
stored.forEach(function (result) {
|
stored.forEach(function (result) {
|
||||||
|
|
Loading…
Reference in New Issue