Skip to content

Commit 4877b32

Browse files
src: html: watcher: Fix address
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent 8994abb commit 4877b32

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/html/watcher.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
<pre><code id="json-data"></code></pre>
1414
</div>
1515
<script>
16-
let WSAPI = `${window.location.protocol == "https" ? "wss" : "ws"}://${
17-
window.location.host.split(":")[0]
18-
}:8088`;
19-
WSAPI = "ws://192.168.0.46:6040"
16+
const path = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'))
17+
const WSAPI = `ws://${window.location.host}${path}`
2018

2119
const app = Vue.createApp({
2220
mounted() {

0 commit comments

Comments
 (0)