bugfix for intercepting some https url

This commit is contained in:
OttoMao
2015-08-19 11:03:33 +08:00
parent decb42222c
commit b513f1a5d7
3 changed files with 6 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ 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",
protocol = (!!req.connection.encrypted && !/^http:/.test(req.url)) ? "https" : "http",
resourceInfo,
resourceInfoId = -1,
reqData;