# Error CORS with primsic & react

**URL:** <https://community.prismic.io/t/error-cors-with-primsic-react/13797>\
**Category:** Developing with Prismic\
**Tags:** reactjs\
**Created:** [August 1, 2023, 5:17pm UTC](https://community.prismic.io/t/error-cors-with-primsic-react/13797 "2023-08-01T17:17:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![racheal.orukele](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@racheal.orukele](https://community.prismic.io/u/racheal.orukele)\
**Post date:** [August 3, 2023, 4:16pm UTC](https://community.prismic.io/t/error-cors-with-primsic-react/13797/3 "2023-08-03T16:16:08Z")

</div>

Hello @quentinserda,

Welcome to Prismic community, and thanks for reaching out to us!

With the code you shared, the type in the routes is `page`, but in your component where you're fetching data custom type is `blog`. You need to update the routes to match the custom types in your repository. So in your case, the route would look like this:

```auto
routes: [
   {
      type: 'blog',
      path: '/:uid',
   },
 ],

```

Try it out and let me know 🙂

Thanks,  
Racheal.

---

_[View the full topic](https://community.prismic.io/t/error-cors-with-primsic-react/13797)._
