mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 20:31:25 +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){
|
function userRequestHandler(req,userRes){
|
||||||
|
|
||||||
var host = req.headers.host,
|
var host = req.headers.host,
|
||||||
urlPattern = url.parse(req.url),
|
|
||||||
path = urlPattern.path,
|
|
||||||
protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http",
|
protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http",
|
||||||
|
fullUrl = protocol + '://' + host + req.url,
|
||||||
|
urlPattern = url.parse(fullUrl),
|
||||||
|
path = urlPattern.path,
|
||||||
resourceInfo,
|
resourceInfo,
|
||||||
resourceInfoId = -1,
|
resourceInfoId = -1,
|
||||||
reqData;
|
reqData;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user