mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 04:41:26 +00:00
Correctly parse url for https if port is not 443.
This commit is contained in:
parent
9e36136075
commit
6a2803b7c1
@ -20,9 +20,10 @@ var defaultRule = require("./rule_default.js"),
|
||||
function userRequestHandler(req,userRes){
|
||||
|
||||
var host = req.headers.host,
|
||||
urlPattern = url.parse(req.url),
|
||||
path = urlPattern.path,
|
||||
protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http",
|
||||
fullUrl = protocol + '://' + host + req.url,
|
||||
urlPattern = url.parse(fullUrl),
|
||||
path = urlPattern.path,
|
||||
resourceInfo,
|
||||
resourceInfoId = -1,
|
||||
reqData;
|
||||
|
Loading…
x
Reference in New Issue
Block a user