update the doc about websocket proxy

This commit is contained in:
砚然
2017-12-12 21:20:56 +08:00
parent 60bc1498ae
commit c018c775c8
3 changed files with 10 additions and 6 deletions

View File

@@ -570,7 +570,7 @@ function getConnectReqHandler(userRule, recorder, httpsServerMgr) {
// determine the request target
if (!shouldIntercept) {
// server info from the original request
const orginServer = {
const originServer = {
host,
port: (targetPort === 80) ? 443 : targetPort
}
@@ -581,7 +581,7 @@ function getConnectReqHandler(userRule, recorder, httpsServerMgr) {
}
// for ws request, redirect them to local ws server
return interceptWsRequest ? localHttpServer : orginServer;
return interceptWsRequest ? localHttpServer : originServer;
} else {
return httpsServerMgr.getSharedHttpsServer(host).then(serverInfo => ({ host: serverInfo.host, port: serverInfo.port }));
}