I’ve build an SPA that uses JWT to authenticate with my server. I know want to fire event to specific userId’s.
I’ve got the following code:
var eventsClient = new ServerEventsClient(runtimeConfig.apiRoot, [ ‘import-policy’ ])
but getting the following error messages:
GET http://localhost:32768/event-stream?channels=import-policy&t=1512577874867 401 (Unauthorized)
Failed to load http://localhost:32768/event-stream?channels=import-policy&t=1512577874867: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. Origin ‘http://localhost:8080’ is therefore not allowed access.