Search code examples
node.jslocalhostnode-http-proxy

node http proxy doesent route to host.com but instead host.com@localhost?


Going nuts on..

This

var app = express(),
proxy = new httpProxy.HttpProxy({
    target: {
        host: 'host.com',
        port: 5280          // Port of XMPP server
    }
});

..

// Proxy BOSH request to XMPP server
app.all('/http-bind', function(req, res) {
    util.puts('Request successfully proxied: ' + req.url);
    util.puts(JSON.stringify(req.headers, true, 2));
    proxy.proxyRequest(req, res);
});

results in

body rid="3965133021" xmlns="http://jabber.org/protocol/httpbind" to="host.com@localhost" .. etc

host.com@localhost? that localhost has to go but cannot get it off ;9

How can that be?! it should go to host.com instead! spend an hour looking trying, anyone knows whats wrong?


Solution

  • This was a local issue with strophe framework. its fixed now.