machinezone / IXWebSocket

websocket and http client and server library, with TLS support and very few dependencies
BSD 3-Clause "New" or "Revised" License
512 stars 167 forks source link

[enhancement] add ability to remove default headers #511

Open zxsleebu opened 3 months ago

zxsleebu commented 3 months ago

default headers on websocket client connection like "User-Agent" and "Origin" are very annoying. please, add an ability to remove automatic addition of these headers. it would be nice if they could be removed, because in my case if these headers are present, server drops the connection

zxsleebu commented 2 months ago

that's what i've done to get ixwebsocket work with riot games webserver. https://github.com/zxsleebu/IXWebSocket/commit/7aa7dcd8d1b9106a76db3f11bd01f7760843fba9

bsergean commented 2 months ago

Hey would you mind making a PR for that ?

We could drop userAgent, but droping Origin sounds a bit more problematic. We'd need some option for that.