Skip to content

Commit 3688f89

Browse files
committed
Tweak
1 parent 53239ed commit 3688f89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mercure.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,19 @@ a JWT containing a topic selector matching by the update's topic.
365365
To provide this JWT, the subscriber can use a cookie,
366366
or a ``Authorization`` HTTP header.
367367

368-
Cookies are automatically sent by the browsers when opening an ``EventSource`` connection if the ``withCredentials`` attribute is set to ``true``.
369-
Using cookies is the most secure and preferred way when the client is a web browser.
370-
If the client is not a web browser, then using an authorization header is the way to go.
368+
Cookies are automatically sent by the browsers when opening an ``EventSource``
369+
connection if the ``withCredentials`` attribute is set to ``true``:
371370

372371
.. code-block:: javascript
373372
374373
const eventSource = new EventSource(hub, {
375374
withCredentials: true
376375
});
377376
377+
Using cookies is the most secure and preferred way when the client is a web
378+
browser. If the client is not a web browser, then using an authorization header
379+
is the way to go.
380+
378381
.. tip::
379382

380383
The native implementation of EventSource doesn't allow specifying headers.

0 commit comments

Comments
 (0)