Setting cors in strapi

I am on a nextJS project with a backend with Strapi: I want to set CORS in Strapi here is what I’ve done on the middleware.js file :

    ` {
        name: 'strapi::cors',
        config: {
          headers: ['Content-Type', 'Authorization', 'Origin', 'Accept'],
          origin: [
          methods: ['GET', 'POST', 'PUT', 'DELETE'],
          keepHeaderOnError: true,

I am still in local but when I am on the port 3001 (to check if my cors policy is working) i don’t have any error CORS error and request are fine (it shouldn’t be the case cause thats not in the origin). Someone can help me please :slightly_smiling_face: Thanks