Access has been blocked by CORS policy

Hello Prismic People,

since today the access via the GraphQL API does not work anymore. In the browser console I see the following message:

Access to fetch at '{%20allContentHubTopics%20{%20edges%20{%20node%20{%20url%20_meta%20{%20tags%20}%20}%20}%20}%20}' from origin 'http://localhost:3333' 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.

The access via the API-Explorer or from a NodeJS-Server works. This is the code:

const prismicResult = await fetch('{ allContentHubTopics { edges { node { url _meta { tags } } } } }', {
  headers: {
    'prismic-ref': '...',
}).then(response => response.json());


1 Like

Hey Alina, glad to see you joining the community forum!

Did you saw this message on your live site or while making tests in development ?

Can you send me the query that is breaking so we can test it on our side?

6 posts were merged into an existing topic: Request header field prismic-ref is not allowed by Access-Control-Allow-Headers in preflight response

This topic is being followed up in a different/related thread. To follow the conversation, please refer to it: