B
B
BonBon Slick2021-03-06 01:02:19
JavaScript
BonBon Slick, 2021-03-06 01:02:19

EventStream empty though events come?

Tested in different ways

// const event = new EventSource(url);
        // const event = new EventSource(url, {withCredentials: true});
        let mercureToken = 'Bearer ' + Cookies.get("mercureAuthorization");
         const event = new EventSourcePolyfill(
            url,
            {
                heartbeatTimeout: 3600*1000,
                headers: {
                  'Authorization': mercureToken,
              },
            },
        );

Any of the approaches, the tab with events is empty. It is very difficult to debug what events arrive.
Used Mercure + caddy server (Debian 10 stretch), symfony (Debian 10 stretch) 2 servers with CORS requests .
I'm sure it's because of some kind of js.

SO answer didn't help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question