emqx / MQTTX

A Powerful and All-in-One MQTT 5.0 client toolbox for Desktop, CLI and WebSocket.
https://mqttx.app
Apache License 2.0
3.79k stars 438 forks source link

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

Open msalajka opened 1 month ago

msalajka commented 1 month ago

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).

ysfscream commented 1 month ago

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