The MercureBundle allows to easily push updates to web browsers and other HTTP clients in the Symfony full-stack framework, using the Mercure protocol.
But doing so will cause the following exception from Symfony\Component\Mercure\Authorization::updateCookies:
An exception has been thrown during the rendering of a template ("The "mercureAuthorization" cookie for the "default hub" has already been set. You cannot set it two times during the same request.").
I am currently working around this by specifying all subscribing URLs in one of the mercure() function call:
Hello,
Assume that I want to subscribe to two (or more) private updates. By intuition I'd write this:
But doing so will cause the following exception from
Symfony\Component\Mercure\Authorization::updateCookies
:I am currently working around this by specifying all subscribing URLs in one of the
mercure()
function call:This works, but doesn't look straightforward. Is this a limitation of the current implmentation of the bundle, or am I doing it wrongly?