mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 00:48:25 +00:00
Switch to secure ws connections when possible (#1380)
This commit is contained in:
parent
acdef10b05
commit
583bc6ea7d
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ class Editor extends React.Component {
|
|||
|
||||
initWebSocket = () => {
|
||||
// TODO: add retry policy
|
||||
const socket = new WebSocket(`ws://${this.getWebsocketUrl()}`);
|
||||
const socket = new WebSocket(`${window.location.protocol === 'https:' ? 'wss' : 'ws'}://${this.getWebsocketUrl()}`);
|
||||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue