We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61afe3c commit c53c89eCopy full SHA for c53c89e
src/main.js
@@ -54,7 +54,13 @@ if (process.env.NODE_ENV === 'development') {
54
wsAddress = 'ws://localhost:8081/api/control';
55
} else {
56
// UI and backend are served on the same host+port on production builds
57
- wsAddress = 'ws://' + window.location.hostname + ':' + window.location.port + '/api/control';
+ let protocol;
58
+ if (window.location.protocol === 'http:') {
59
+ protocol = 'ws:'
60
+ } else {
61
+ protocol = 'wss:'
62
+ }
63
+ wsAddress = protocol + '//' + window.location.hostname + ':' + window.location.port + '/api/control';
64
}
65
66
// Connect to the backend with a single websocket that communicates with JSON format and is attached to the store
0 commit comments