Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
crummy
· 4y ago · 0 comments
> it doesn't suffer from most WebSocket limitations (e.g. header/cookie based authorization works)
Don't WS connections send headers? What's the limitation here?
Comments
[–]
chalas_r
4y ago
Actually neither the WebSocket nor the SSE browser APIs allow to send custom headers (see
https://stackoverflow.com/q/4361173/4363634
,
https://stackoverflow.com/q/36201347/4363634
). Point is that the Mercure protocol specifies the authorization part deeply so it's handled out of the box. With WebSocket you are on your own.