Merge branch 'silentcloud-fix/wss-port'

This commit is contained in:
xiaofeng.mxf 2020-01-01 19:36:17 +08:00
commit 3e2daef4aa

View File

@ -710,7 +710,8 @@ function getWsHandler(userRule, recorder, wsClient, wsReq) {
};
const clientMsgQueue = [];
const serverInfo = getWsReqInfo(wsReq);
const wsUrl = `${serverInfo.protocol}://${serverInfo.hostName}:${serverInfo.port}${serverInfo.path}`;
const serverInfoPort = serverInfo.port ? `:${serverInfo.port}` : '';
const wsUrl = `${serverInfo.protocol}://${serverInfo.hostName}${serverInfoPort}${serverInfo.path}`;
const proxyWs = new WebSocket(wsUrl, '', {
rejectUnauthorized: !self.dangerouslyIgnoreUnauthorized,
headers: serverInfo.noWsHeaders