Browse Source

handle secure web socket

main
Nicolas Massé 3 years ago
parent
commit
9418433e5c
  1. 6
      src/main/resources/META-INF/resources/index.html

6
src/main/resources/META-INF/resources/index.html

@ -73,7 +73,11 @@
<script>
var connected = false;
var socket;
socket = new WebSocket("ws://" + location.host + "/antennas");
var wsproto = "ws";
if (location.protocol == "https:") {
wsproto = "wss";
}
socket = new WebSocket(wsproto + "://" + location.host + "/antennas");
socket.onopen = function () {
console.log("connected to WS")
}

Loading…
Cancel
Save