-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Turbo] Add mercure()
to turbo_stream_listen()
#1860
Comments
Yes, I have the same problem. In dev mercure is working fine but in production I can't use it. I'm getting 401. |
Same problem/question here. |
Could you guys set up a small reproducer app, with everything needed to test (like an example you need to work that does not today) ? |
@smnandre I'll try probably tomorrow. I'll try to explain better what I think @seb-jean is asking. In short, <script>
const eventSource = new EventSource("{{ mercure('https://example.com/books/1', { subscribe: 'https://example.com/books/1' })|escape('js') }}", {
withCredentials: true
});
</script> As you can see On the other hand, So, what I think he is asking (and what I think it's needed is):
See #1774 |
Yes, that's exactly it, plus the ability to subscribe to multiple topics. |
Hi,
For generate the URL of the Hub and for automatically set the cookie required to use the authorization mechanism, we need Twig helper
mercure()
(PR: symfony/mercure#62)But how to use it with
turbo_stream_listen()
?The text was updated successfully, but these errors were encountered: