Hello I have a common issue with CORS, this is my error in the console :
Access to fetch at 'https://livre-blanc.cdn.prismic.io/api/v2/documents/search?q=[[at(document.type%2C+"blog")]]&pageSize=1&ref=ZMWitxAAACMANOL5&routes=[{"type"%3A"page"%2C"path"%3A"%2F%3Auid"}]' from origin 'http://localhost:5173' has been blocked by CORS policy: 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.
How could I disable this to have the full access of my data ?
This is my code
import * as prismic from '@prismicio/client'
export const repositoryUrl = 'myUrlRepo'
export const client = prismic.createClient(repositoryUrl, {
routes: [
{
type: 'page',
path: '/:uid',
},
],
})
The component i try to display :
import {Button} from "../atoms/Button.jsx";
import {useSinglePrismicDocument} from "@prismicio/react";
export const Blog = () => {
const blog = useSinglePrismicDocument("blog");
console.log(blog)
return (
<>
<Button />
</>
)
}
If you have a solution it would be great !