Skip to content

Requests with proxied domain names in query arguments route unexpectedly #257

@danielfay

Description

@danielfay

Hello,

I'm having an issue with my proxy properly routing when a domain earlier in the proxy (such as myothersite.ca) is present in the query arguments of a later site.

The structure of the proxy file looks like this:

var httpProxy = require('http-proxy');

var options = {
  router: {
    'myothersite.ca': '127.0.0.1:9003',
    'example2.mysite.ca': '127.0.0.1:9002',
    'example.mysite.ca': '127.0.0.1:9001',
    'mysite.ca': '127.0.0.1:9000'
  }
};

// main reverse-proxy router
var proxyServer = httpProxy.createServer(options);
proxyServer.listen(80);

With the example above the following cases won't route correctly:

But the following will route correctly:

Can someone point me at the lines that do this parsing? It should be a straight forward fix after that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions