CORS issues with graphql-listen

Hello :wave:

I’m trying to implement live-update API on our pages, however Chrome is not happy, and cancels the request due to CORS.

When checking the request response, Access-Control-Allow-origin is set to *.
Running from Localhost there are no problems, and the error is only shown on our test environment.

The following error is shown in console:

Access to fetch at 'https://graphql-listen.datocms.com/channels/ce78c63b-9f42-4e6c-a13e-be42ac5c63df' 
from origin 'https://example.azurewebsites.net' has been blocked by CORS policy: 
Response to preflight request doesn't pass access control check: 
No 'Access-Control-Allow-Origin' header is present on the requested resource. 
If an opaque response serves your needs, set the
 request's mode to 'no-cors' to fetch the resource with CORS disabled.

Have you seen this behavior before, or can I do something to fix et?

Thanks in advance :raised_hands:

hey @online I think we are dealing with this over email, right? We are going to post here the outcome for everyone else.

7 posts were split to a new topic: CORS issues with Angular and graphql-listen live updates on Azure