We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1067054 commit 99f7572Copy full SHA for 99f7572
lib/http-proxy/common.js
@@ -75,7 +75,7 @@ common.setupSocket = function(socket) {
75
};
76
77
common.getPort = function(req) {
78
- var res = req.headers.host.match(/:(\d+)/);
+ var res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
79
return res ?
80
res[1] :
81
req.connection.pair ? '443' : '80' ;
0 commit comments