Closed dpvenkatesh closed 6 months ago
This library manages the server-end of SSE, only.
If you want to be able to send headers from the client you should use an EventSource
library that allows you to do so. EventSource/eventsource
and Yaffle/EventSource
are two good options.
For example, using EventSource/eventsource
:
const eventsource = new EventSource(
"/sse",
{
headers: {
Authorization: "<content>"
}
}
);
Can you add an example of passing Authorization headers while connecting to see from the client.