From e1fa4f090c875559ced9701b5b02609836fd3aaa Mon Sep 17 00:00:00 2001 From: srcrs Date: Fri, 28 Jul 2023 02:28:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20websocket=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 6f1a28f..26ba594 100644 --- a/index.html +++ b/index.html @@ -103,7 +103,7 @@ }; }, async created() { - const socket = new WebSocket("ws://localhost:8080/ws"); + const socket = new WebSocket("ws://" + window.location.host + "/ws"); socket.onmessage = event => { const feed = JSON.parse(event.data); this.feeds.push(feed);