Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3924

dunglas mercure server / javascript EventSource withCredentials : no headers / no cookie

$
0
0

Making a mercure /hub dispaching Updates with symfony 4.4 works fine until I dont try using credentials with mercureAuthorization cookie.

As soon as I add {withCredentials: true} in EventSource, firefox kicks out event source request connection with "CORS missing" (whereas chrome doesn't)

'same origin' policy don't allow consulting 'http://localhost:3000/.well-known/mercure ... ' Reason: CORS header 'Access-Control-Allow-Origin' missing

Plus, I'm supposed to get the mercureAuthorization cookie passed from my page request to the event source request, but it isn't.

Here is my homePage cookie :

Set-Cookie: mercureAuthorization=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXJjdXJlIjp7InN1YnNjcmliZSI6WyJodHRwOlwvXC9ub3RpZnkuY29tXC9wYXJhbmdvblwvdGVhbSJdfX0.e5YOGcOx-s-8nn2lbseqcVlk18dVEvgZIoKrDCEureA; path=/.well-known/mercure; httponly; samesite=strict;

My event source Request

Request URL: http://localhost:3000/.well-known/mercure?topic=http://notify.com/

No Set-Coockie indside.

Do I need to have mercure set to https? Or js Pollyfil EventSource ?


Viewing all articles
Browse latest Browse all 3924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>