Skip to content

Commit

Permalink
dynamic ws/wss selection
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Feb 20, 2021
1 parent 4a74f29 commit 31d408a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/api/mqtt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 31d408a

Please sign in to comment.