The question is: Access to fetch at 'https://repository_url...' from origin 'https://my_domain..' has been blocked by CORS policy: Request header field prismic-ref is not allowed by Access-Control-Allow-Headers in preflight response.
Hi Phil, trying to debug a similar issue as above. This issue started happening yesterday morning and we have not touched any surrounding code for a few weeks. Was there something at Prismic that changed?
The error I get is: Request header field Prismic-ref is not allowed by Access-Control-Allow-Headers.
It works in the API browser but not from the client. If you look at the header I sent I am including the prismic-ref.
This was working mid last week and no changes have been made around this functionality for a long time.
Any help you could provide would be great! I spent all day Friday debugging this without any luck. Weird thing is we have another Prismic account that is currently working fine that uses the same code.
Thank you for the extra information. I'm not really sure what the issue could be here in that case. So I've re-opened this conversation and moved our conversation public so that I can get help from the team. I've also removed any sensitive content from the messages.
Like I said I'll discuss with the devs and find out more about the situation, once I have any update or need any more info, I'll let you know here.
As already mentioned the access works in GraphiQL (https://javaminidoodle.prismic.io/graphql) or on a NodeJS server. This is only a browser problem. Apparently the "Access-Control-Allow-Origin" header is no longer set. The day before yesterday it all worked fine.
I can reproduce this on your repository. Anything from javaminidoodle.prismic.io returns Access-Control-Origin: *, but anything else doesn't return this. It might be linked with this issue?