Using eventsource as a polyfill supporting headers for SSE, we can avoid issues with cookies.
- As cookies are shared between tabs, opening multiple tabs for different tasks will cause race conditions and break some mercure connections
- As cookies in the bundle don't allow configuring
samesite, it is more code to support non strict modes
- As Symfony 5 doesn't even support cookie partitionning, using mercure in a iframe on a third party domain is impossible.
I suggest adding two methods to Twig extension: mercure_url and mercure_token. Both would not trigger cookie creation.
Using
eventsourceas a polyfill supporting headers for SSE, we can avoid issues with cookies.samesite, it is more code to support non strict modesI suggest adding two methods to Twig extension:
mercure_urlandmercure_token. Both would not trigger cookie creation.