-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
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:
- http://mysite.ca/[email protected]
- This will route to myothersite.ca
- http://example.mysite.ca/?refer_url=example2.mysite.ca
- This will route to example2.mysite.ca
But the following will route correctly:
- http://myothersite.ca/[email protected]
- This will route to myothersite.ca
- http://example2.mysite.ca/?refer_url=example.mysite.ca
- This will route to example2.mysite.ca
Can someone point me at the lines that do this parsing? It should be a straight forward fix after that.
Metadata
Metadata
Assignees
Labels
No labels