Describe the bug
We have an MQTT broker reachable via Websocket at e.g.
wss://foo.bar.com:8883/broker/ws. If I use this URL the pathname
/broker/ws is stripped/ignored and Paho tries to connect to
Steps to reproduce the behavior:
- Go to ‘Realtime/MQTT’
- Check error message in console which shows the stripped URL without its pathname
The pathname should not be stripped.
- Browser: Firefox
- Version 94
The issue is due to this line: github.com/hoppscotch/hoppscotch/blob/f28b55dd4d854653582fdef9edf2b32c2584782c/packages/hoppscotch-app/components/realtime/Mqtt.vue#L247
Maybe a fix could look like this?
parseUrl.hostname + parseUrl.pathname !== "/" ? parseUrl.pathname : ""
Read more here: Source link