This commit is contained in:
guox191
2019-03-13 21:26:40 +08:00
parent d44ce7fd08
commit 59e05850fa
4 changed files with 16 additions and 20 deletions

View File

@@ -67,7 +67,7 @@ function KoaServer() {
this.logWsRequest = function (wsReq) {
const headers = wsReq.headers;
const host = headers.host;
const isEncript = true && wsReq.connection && wsReq.connection.encrypted;
const isEncript = wsReq.connection && wsReq.connection.encrypted;
const protocol = isEncript ? 'wss' : 'ws';
let key = `${protocol}://${host}${wsReq.url}`;
// take proxy data with 'proxy-' + url