symfony/mercure

Authorization use VM IP instead of subdomain/domain name

geoffroyp opened this issue · 1 comments

Greetings,

I'm trying to set up a project using mercure to push events from a symfony API to a react website.

When the user enters his credentials on the login page of my react website, it calls the API which respond in an appropriate way, but also set a mercure cookie like this:

` public function __construct(
private RequestStack $requestStack,
private Authorization $authorization
)
{
}

// and further, in a function:
$this->authorization->setCookie($request, ['https://example.com/books/1']);`

problem is, I get the following error:
Unable to create authorization cookie for a hub on the different second-level domain "192.168.1.43".

why does it tries to use my VM IP as domain, hwile my API actually has a working subdomain/domain name set, as well as TLS activated?

#54 Maybe this issue could help