Add compression to getInstanceName

Set the compression header when doing requests in getInstanceName.
This commit is contained in:
Hornwitser committed 2019-09-18 13:55:01 +02:00
1 parent c5cae30d83
commit aaf43143df
1 file changed
+1 -1
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = function(config){
return new Promise((resolve, reject) => {
let instance = instances[instanceID];
if(!instance){
needle.get(config.masterURL + '/api/slaves', (err, response) => {
needle.get(config.masterURL + '/api/slaves', { compressed: true }, (err, response) => {
if(err || response.statusCode != 200) {
console.log("Unable to get JSON master/api/slaves, master might be unaccessible");
} else if (response && response.body) {