I Am getting a CORS issue when trying to access my CMS. My GraphQLClient looks like so:
url: 'https://brandr-dev.admin.datocms.com',
headers: {
"Authorization": "Bearer ACCESS_KEY",
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET,HEAD,OPTIONS,POST,PUT',
'Access-Control-Allow-Headers': 'Origin, X-Requested-With, Content-Type, Accept, Authorization',
'mode': 'no-cors'
}
})
and the error that I am getting is the following:
Access to fetch at 'https://brandr-dev.admin.datocms.com/' from origin 'https://localhost:3000' 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.
I have tried to follow this documentation: Access-Control-Allow-Origin - HTTP | MDN
Nothing works for me