Skip to content
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

[Feature] Support custom http headers for websocket connections #1722

Closed
msalajka opened this issue Jul 16, 2024 · 2 comments
Closed

[Feature] Support custom http headers for websocket connections #1722

msalajka opened this issue Jul 16, 2024 · 2 comments
Assignees
Labels
CLI MQTTX CLI desktop MQTTX Desktop discussion This issues and pr are worth discussing feature This pr is a feature web MQTTX Web
Milestone

Comments

@msalajka
Copy link

Motivation

Authentication: Custom headers can include authentication tokens (e.g., JWTs, API keys) that are necessary to authenticate users or devices before establishing a connection.

Custom Protocols: In some use cases, clients and servers might follow proprietary or custom protocols that require specific headers to establish a connection or negotiate terms (for example vmware cloud director requires to set header Sec-WebSocket-Protocol to mqtt to establish a WebSocket connection).

@msalajka msalajka added the feature This pr is a feature label Jul 16, 2024
@ysfscream ysfscream self-assigned this Jul 17, 2024
@ysfscream ysfscream added discussion This issues and pr are worth discussing CLI MQTTX CLI web MQTTX Web desktop MQTTX Desktop labels Jul 17, 2024
@ysfscream ysfscream modified the milestones: v2.0.0-alpha.1, v1.11.0 Jul 18, 2024
@ysfscream
Copy link
Member

This is a good suggestion. We will consider whether we can support it. Thank you!

@ysfscream
Copy link
Member

Updated on https://github.com/emqx/MQTTX/releases/tag/v1.11.0

However, it should be noted that we can only support it in CLI. Use mqttx sub -t test -wh "hello: test" -wh "auth: token" -l ws -p 8083.

Due to browser security restrictions, we cannot implement this function for Desktop and Web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI MQTTX CLI desktop MQTTX Desktop discussion This issues and pr are worth discussing feature This pr is a feature web MQTTX Web
Projects
Status: Done
Development

No branches or pull requests

2 participants