diff options
author | nea <romangraef@gmail.com> | 2022-11-27 19:55:13 +0100 |
---|---|---|
committer | nea <romangraef@gmail.com> | 2022-11-27 19:55:13 +0100 |
commit | ee4dbe1cfc72f90eb04a6452a381723b9e4c2b7f (patch) | |
tree | 33cd61b92e3499d0b52b39f8d9d3cbce6f42626a | |
parent | 9d18011859ba5f9bb11d08de8e482496823e9963 (diff) | |
download | chess-ee4dbe1cfc72f90eb04a6452a381723b9e4c2b7f.tar.gz chess-ee4dbe1cfc72f90eb04a6452a381723b9e4c2b7f.tar.bz2 chess-ee4dbe1cfc72f90eb04a6452a381723b9e4c2b7f.zip |
secure websockets
-rw-r--r-- | index.html | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -58,8 +58,7 @@ <script> class Board { constructor(elem) { - - this.socket = new WebSocket(`ws://${window.location.host}/socket`) + this.socket = new WebSocket(`${location.protocol.includes('s') ? 'wss' : 'ws'}://${window.location.host}/socket`) this.exiting = false this.boardState = {} window.addEventListener('beforeunload', () => { |