Fix https in websocket connections
This commit is contained in:
parent
aaad333ef6
commit
a7741ab62b
@ -49,7 +49,7 @@ const WsHandler = (props) => {
|
||||
stop();
|
||||
}
|
||||
|
||||
const type = (location.protocol === "https") ? "wss" : "ws";
|
||||
const type = (location.protocol === "https:") ? "wss" : "ws";
|
||||
const socket = new WebSocket(type + ":" + location.host + "/events")
|
||||
socket.onopen = () => {
|
||||
socket.send(JSON.stringify({
|
||||
|
Loading…
x
Reference in New Issue
Block a user