symfony/mercure

Feature request: Twig helper generating hub URL with authorization parameter

wooky opened this issue · 0 comments

wooky commented

If the Mercure hub is located on a completely different domain from the one where the front-end is hosted, then authorizing with the hub using cookies doesn't work (AFAIK). Using Authorization header doesn't work with the browser's native EventSource. This leaves adding an authorization parameter to the hub query.

I propose adding a Twig extension to generate a hub URL, similar to the existing mercure() function, but adding an authorization param to the query.