@nohost/router
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -56,3 +56,3 @@ const url = require('url'); | ||
_getStatus(space, group, env) { | ||
const { base64 } = this._result; | ||
const { base64, servers } = this._result; | ||
if (!this._base64 || this._base64 !== base64) { | ||
@@ -66,3 +66,3 @@ this._statusCache = {}; | ||
if (!status) { | ||
const options = parseUrl(`${this._servers[0].statusUrl}${query}`); | ||
const options = parseUrl(`${servers[0].statusUrl}${query}`); | ||
options.headers = { 'x-nohost-servers': base64 }; | ||
@@ -69,0 +69,0 @@ status = getJSON(options); |
@@ -6,3 +6,2 @@ const http = require('http'); | ||
const TIMEOUT = 2000; | ||
let curServers; | ||
const noop = (_) => _; | ||
@@ -98,10 +97,6 @@ | ||
list = list.filter(noop); | ||
if (!list.length) { | ||
return curServers; | ||
} | ||
curServers = { | ||
return list.length && { | ||
servers: usableServers, | ||
base64: Buffer.from(list.join()).toString('base64'), | ||
}; | ||
return curServers; | ||
}; |
{ | ||
"name": "@nohost/router", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "Nohost cluster router", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13513
320