Skip to content
Advertisement

Tag: strapi

Middleware “strapi::session”: App keys are required. Please set app.keys in config/server.js (ex: keys: [‘myKeyA’, ‘myKeyB’])

Trying to set up strapi and cloudinary I watched two videos and they are all OK, but I have an error, tell me why? Middleware “strapi::session”: App keys are required. Please set app.keys in config/server.js (ex: keys: [‘myKeyA’, ‘myKeyB’]) plugins.js .env server.js middlewares.js admin.js Answer It looks like you don’t have APP_KEYS defined in your .env file (assuming you’re sharing

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

How to add side effect to creating new record in Strapi by customizing controller?

I am trying to trigger a side effect (send notification, using socket.io) when adding new record in Strapi. The socket setup is OK, successfully emitting from back-end (Strapi API) to front-end. I followed the docs on customizing controllers and the recommendations in this Stack Overflow thread, but didn’t help. Nothing happens when changing the controller – tried to break it

Advertisement