cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.01k stars 2.71k forks source link

Custom http websocket upgrade request #2859

Closed FabianTerhorst closed 1 month ago

FabianTerhorst commented 1 month ago

Having the possibility to dynamically set the host header field inside the http upgrade to websocket request is required for me under specific circumstances where the url contains a ip address instead of a domain. To have a correctly working behavior the host still needs to be set to the domain name in this case. But mongoose does not allow specifying the host independently inside the websocket upgrade: https://github.com/cesanta/mongoose/blob/d763fce8ed584530ebd1d4c15f69df05a7164379/src/ws.c#L247 Making it possible to build the websocket upgrade http request more dynamically while not having to reimplement the ´mg_ws_cb´ would be appreciated.

Environment

scaprile commented 1 month ago

This is not a Mongoose issue. It is something you request. Mongoose 7.1.4 does not exist. If you need a specific change, please clearly explain your use case and why it is needed. Clearly describe the whole scenario, what is done, what is not, what is needed, and why. If you are a paying customer, please contact Support as per your contract.