title: Symfony Mercure : EventSource don't send cookie
body: <p>With <a href="https://symfony.com/doc/current/components/mercure.html" rel="nofollow noreferrer">Symfony Mercure</a>, I want to send a cookie authorization :</p>
  
  <ul>
  <li>Symfony server : <a href="https://127.0.0.1:8000/" rel="nofollow noreferrer">https://127.0.0.1:8000/</a></li>
  <li>Mercure Hub : <a href="http://localhost:3000/.well-known/mercure" rel="nofollow noreferrer">http://localhost:3000/.well-known/mercure</a></li>
  </ul>
  
  <p>I start my Mercure server with this command :</p>
  
  <pre><code>mercure/mercure.exe --jwt-key='...jwtToken...' --addr='localhost:3000' --allow-anonymous --cors-allowed-origins='https://127.0.0.1:8000'
  </code></pre>
  
  <p>And this is how I try to send the Cookie <code>withCredentials: true</code> :</p>
  
  <pre><code>const url = new URL('http://localhost:3000/.well-known/mercure')
  url.searchParams.append('topic', 'https://bubble.com/message')
  
  const eventSource = new EventSource(url, { withCredentials: true })
  </code></pre>
  
  <p>In my current page <code>https://127.0.0.1:8000/message</code>, in the console, I can see the cookie :</p>
  
  <blockquote>
    <p>set-cookie: mercureAuthorization=...cookieValue...; path=/.well-known/mercure; secure; httponly; samesite=lax</p>
  </blockquote>
  
  <p><strong>But the cookie is never sent</strong>. In my console, network tab, I can see the eventsource request <code>http://localhost:3000/.well-known/mercure?topic=https%3A%2F%2Fbubble.com%2Fmessage</code> but the cookie is never transmitted.</p>
  
  <p>I tried to change <code>secure=false</code> and <code>samesite=none</code>, but the cookie is never transmitted.</p>
  
  <p>Here is the information from the eventsource request (Mercure Hub) :</p>
  
  <p><a href="https://i.stack.imgur.com/fvY0J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fvY0J.png" alt="enter image description here"></a></p>