diff --git a/static/js/index.js b/static/js/index.js index 7bb58e8..afbe7fa 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -123,7 +123,7 @@ class Game extends GameBasic { let that = this; - this.ws = new WebSocket(window.location.href); + this.ws = new WebSocket(origin); this.ws.addEventListener('message', function (e) { that.recv(e) });