Blake Blackshear 4 роки тому
батько
коміт
31d408a746
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      web/src/api/mqtt.jsx

+ 1 - 1
web/src/api/mqtt.jsx

@@ -34,7 +34,7 @@ export function MqttProvider({
   config,
   children,
   createWebsocket = defaultCreateWebsocket,
-  mqttUrl = `${baseUrl.replace(/^https?:/, 'ws:')}/ws`,
+  mqttUrl = `${baseUrl.replace(/^http/, 'ws')}/ws`,
 }) {
   const [state, dispatch] = useReducer(reducer, initialState);
   const wsRef = useRef();