Skip to content

Commit

Permalink
Added support to use behind proxy (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
sefirosweb authored Dec 17, 2023
1 parent 0aaa4b9 commit 2788ae6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<title>Mineflayer StateMachine</title>

<link rel="stylesheet" type="text/css" href="/web/index.css" />
<link rel="stylesheet" type="text/css" href="./web/index.css" />

<script src="/socket.io/socket.io.js"></script>
<script src="/web/index.js"></script>
<script src="./socket.io/socket.io.js"></script>
<script src=".//web/index.js"></script>
</head>

<body onload="init()">
Expand Down
4 changes: 3 additions & 1 deletion web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,9 @@ function init () {
graph = new Graph(canvas)
nestedGroups = []

const socket = io()
const socket = io({
path: window.location.pathname + 'socket.io'
})
socket.on('connected', packet => onConnected(packet))
socket.on('stateChanged', packet => onStateChanged(packet))
}
Expand Down

0 comments on commit 2788ae6

Please # to comment.