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 681cf4f commit f7b7035Copy full SHA for f7b7035
src/main.js
@@ -11,7 +11,13 @@ if (process.env.NODE_ENV === 'development') {
11
wsAddress = 'ws://localhost:8082/api/vision';
12
} else {
13
// UI and backend are served on the same host+port on production builds
14
- wsAddress = 'ws://' + window.location.hostname + ':' + window.location.port + '/api/vision';
+ let protocol;
15
+ if (window.location.protocol === 'http:') {
16
+ protocol = 'ws:'
17
+ } else {
18
+ protocol = 'wss:'
19
+ }
20
+ wsAddress = protocol + '//' + window.location.hostname + ':' + window.location.port + '/api/vision';
21
}
22
23
Vue.use(VueNativeSock, wsAddress, {
0 commit comments