Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> To this day I still dont know why WebSockets and SSE dont support sending headers on the initial request

Doesn't the initial request get to send a full set of standard HTTP headers, cookies and all?



It does, but if you're calling it from the browser you can't add arbitrary data to them (the way you can in e.g. a `fetch`)


Someone at Azure thought of this[1]

[1] https://github.com/Azure/fetch-event-source


> you can't add arbitrary data to them

What about intercepting the request with a service worker?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: