symfony / mercure

The Mercure Component allows to easily push updates to web browsers and other HTTP clients using the Mercure protocol.
https://symfony.com/doc/current/components/mercure.html
MIT License
413 stars 39 forks source link

"Unable to create authorization cookie for a hub on the different second-level domain" error for requests sent from server component of Next.js (API Platform) #119

Open c1tru55 opened 2 months ago

c1tru55 commented 2 months ago

I want to get authorization cookie value for my app.localhost domain (public URL of app and mercure hub), but request is sent from server component of Next.js in API Platform, so my current request host is php (same as private URL of mercure hub). as a result I've got an error Unable to create authorization cookie for a hub on the different second-level domain "app.localhost".. maybe it makes sense to compare request host not only with hub public url host, but also with private url?