Skip to content

Tag: strapi

Strapi v4 throwing cors exception

Im new to strapi and I have downloaded strapi v4 and as front-end I use vue.js. Now I created categories and I am trying to fetch those with my vue app but I’m getting a cors error. In the documentation I see I can override the origin on the cors middleware, but I don’t know how. I’ve tried it with

strapi 4 populate when update

Is there an way to populate the field when updating, Answer You can do this, by attaching the populate=[your_relational_field] as the query string in the http PUT request call. Sample request http://localhost:1337/api/cart/2?populate=category Sample request body in JSON format That’s all! You don’t even need to override the core update method in your controller and the query string will directly be