-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: url path is removed at wechat environment #1892
Comments
timzaak
changed the title
[Bug]: url path is removed in wechat
[Bug]: url path is removed at wechat environment
Jun 20, 2024
MQTT.js/src/lib/connect/index.ts Line 113 in 82a4b79
This delete, need add if (opts.unixSocket) {
opts.protocol = opts.protocol.replace('+unix', '') as MqttProtocol
// the next line needs change to this
} else if (!opts.protocol?.startsWith('ws') && !opts.protocol?.startsWith('wx') && !opts.protocol?.startsWith('ali')) {
// consider path only with ws protocol or unix socket
// url.parse could return path (for example when url ends with a `/`)
// that could break the connection. See https://github.com/mqttjs/MQTT.js/pull/1874
delete opts.path
} |
This should be true if you are using protocol |
timzaak
added a commit
to timzaak/MQTT.js
that referenced
this issue
Jun 25, 2024
robertsLando
pushed a commit
that referenced
this issue
Jun 26, 2024
* fix issue: #1892 * lint-fix --------- Co-authored-by: y-crew server <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MQTTjs Version
5.7.0
Broker
NO
Environment
Browser
Description
the url would change to
wss://www.example.com/
【expect】
the url would be
wss://www.example.com/mqtt
Minimal Reproduction
as description
Debug logs
NO LOG
The text was updated successfully, but these errors were encountered: