passing headers on connect
databasedav opened this issue · comments
databasedav commented
WsMeta::connect
takes url
and protocols
, how do we pass headers?
Naja Melan commented
Hi, which headers are we talking about? This is a TCP connection with websocket on top. See the MDN documentation of the Js API this wraps. It does not take headers.
databasedav commented
oof, all the websocket clients i've used in the past have allowed specifying headers, but this is the first time i'm working in the browser and didn't realize the web API was so basic, it looks like simply passing the authorization header in the protocols
is a common workaround to this
thanks