Only set host header if it's sent before.

pull/5/head
Jim Heising 2015-03-13 18:45:09 -05:00
parent 8aefcd604f
commit bd56f59f64
1 changed files with 3 additions and 1 deletions

View File

@ -111,7 +111,9 @@ function processRequest(req, res)
}
// Make sure the host header is to the URL we're requesting, not thingproxy
req.headers["host"] = remoteURL.host;
if(req.headers["host"]) {
req.headers["host"] = remoteURL.host;
}
var proxyRequest = request({
url: remoteURL,