Skip to content

Commit 365a669

Browse files
authored
Add CORS_ALLOWED_ORIGINS to running mercure
I had some trouble to get the example running due to the simple fact that running mercure without a proper `CORS_ALLOWED_ORIGINS` value was preventing Firefox from connecting to the EventStream (instant close). Using chrome which keeps the connection but complains than with a proper error message hinting the to CORS_ALLOWED_ORIGIN finally helped me to figure out the problem. So just adding the value to the example could reduce some headache.
1 parent 72f23a4 commit 365a669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mercure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Run the following command to start it:
7171

7272
.. code-block:: terminal
7373
74-
$ JWT_KEY='aVerySecretKey' ADDR='localhost:3000' ALLOW_ANONYMOUS=1 ./mercure
74+
$ JWT_KEY='aVerySecretKey' ADDR='localhost:3000' ALLOW_ANONYMOUS=1 CORS_ALLOWED_ORIGINS=* ./mercure
7575
7676
.. note::
7777

0 commit comments

Comments
 (0)