mirror of
https://github.com/d0zingcat/cors-anywhere.git
synced 2026-05-13 23:16:51 +00:00
Avoid double ports in host header
Previously, it was possible that the host header looks like domain.com:4444:4444 - obviously a bug.
This commit is contained in:
@@ -184,7 +184,7 @@ var getHandler = exports.getHandler = function(options) {
|
||||
});
|
||||
|
||||
// Only add port if it was explicitly set
|
||||
req.headers.host = host + (match[4] ? ':' + port : '');
|
||||
req.headers.host = hostname + (match[4] ? ':' + port : '');
|
||||
|
||||
proxyRequest(req, res, proxy, full_url, {
|
||||
host: hostname,
|
||||
|
||||
Reference in New Issue
Block a user