Commit b304ffe4 authored by Caio Quirino da Silva's avatar Caio Quirino da Silva
Browse files

Fix target server

The correct is to reach server using host header, not URL.
1 merge request!945Fix target server
Pipeline #1331 failed with stages
Showing with 2 additions and 1 deletion
+2 -1
......@@ -32,7 +32,8 @@ var proxy = httpProxy.createServer();
var server = http.createServer(function (req, res) {
util.puts('Receiving reverse proxy request for:' + req.url);
proxy.web(req, res, {target: req.url, secure: false});
var destinationServer="http://"+req.headers.host;
proxy.web(req, res, {target: destinationServer, secure: false});
}).listen(8213);
server.on('connect', function (req, socket) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment