mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
commit
c22610af75
@ -75,7 +75,7 @@ common.setupSocket = function(socket) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
common.getPort = function(req) {
|
common.getPort = function(req) {
|
||||||
var res = req.headers.host.match(/:(\d+)/);
|
var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
|
||||||
return res ?
|
return res ?
|
||||||
res[1] :
|
res[1] :
|
||||||
req.connection.pair ? '443' : '80' ;
|
req.connection.pair ? '443' : '80' ;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user