-
-
Notifications
You must be signed in to change notification settings - Fork 388
Open
Labels
Description
I have this mercure configuration:
mercure:
hubs:
hub1:
url: 'https://mercure.domain.local1/.well-known/mercure'
public_url: 'https:///mercure.domain.local1/.well-known/mercure'
jwt:
secret: '%env(string:MERCURE_JWT_SECRET)%'
publish: '*'
hub2:
url: 'https://mercure.domain.local2/.well-known/mercure'
public_url: 'https:///mercure.domain.local2/.well-known/mercure'
jwt:
secret: '%env(string:MERCURE_JWT_SECRET)%'
publish: '*'
In twig, I can use this following code:
{{ turbo_stream_listen('App\\Entity\\Book', 'hub1', { withCredentials: true }) }}
But can't use:
{{ turbo_stream_listen('App\\Entity\\Book', 'hub2', { withCredentials: true }) }}
I have the error:
Unable to create authorization cookie for a hub on the different second-level domain mercure.domain.local1
The system behind turbo_stream_listen
use the first hub (transport) of the configuration and not the hub assigned in the function to create the cookie of Mercure Authorization.