From b78a3a2969306d15e434bd0954bd28f34f119b4b Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Sat, 8 May 2021 20:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E8=AE=BF=E9=97=AE=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=B8=AD=E6=98=BE=E7=A4=BAws=E5=92=8Cwss?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/public/js/components/server/http-access-log-box.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/public/js/components/server/http-access-log-box.js b/web/public/js/components/server/http-access-log-box.js index 751df2b4..ac26a3ae 100644 --- a/web/public/js/components/server/http-access-log-box.js +++ b/web/public/js/components/server/http-access-log-box.js @@ -1,8 +1,16 @@ Vue.component("http-access-log-box", { props: ["v-access-log"], data: function () { + let accessLog = this.vAccessLog + if (accessLog.header != null && accessLog.header.Upgrade != null && accessLog.header.Upgrade.values != null && accessLog.header.Upgrade.values.$contains("websocket")) { + if (accessLog.scheme == "http") { + accessLog.scheme = "ws" + } else if (accessLog.scheme == "https") { + accessLog.scheme = "wss" + } + } return { - accessLog: this.vAccessLog + accessLog: accessLog } }, methods: {