From 0d042f97d8e15e708ee25129f99dc547e533b687 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Tue, 15 Nov 2022 13:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0websocket=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/version.txt | 2 +- templates/logtail.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/version.txt b/js/version.txt index 5553d8c..42ae833 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.8.8 \ No newline at end of file +3.8.7 \ No newline at end of file diff --git a/templates/logtail.html b/templates/logtail.html index 2013806..6d35f4f 100644 --- a/templates/logtail.html +++ b/templates/logtail.html @@ -78,10 +78,13 @@ } function getWsUrl() { let host = location.host; + let hostname = location.hostname; let protocol = 'ws:'; - // let port = location.port; + let port = location.port; let pathname = '/ws'; + let ws_port = parseInt(port)+1; return protocol+'//'+host+pathname; + // return protocol+'//'+hostname+':'+ws_port+pathname; } // const websocketUrl = 'ws://localhost:8080/log'; const websocketUrl = getWsUrl(); -- GitLab