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);
|
||||
}
|
||||
|
||||
var confTokens = config.tunnel;
|
||||
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' });
|
||||
if (config.tunnel) {
|
||||
var confTokens = config.tunnel;
|
||||
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' });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
storage.all().then(function (stored) {
|
||||
stored.forEach(function (result) {
|
||||
|
|
Loading…
Reference in New Issue