Help find a solution to CORS

System Information
  • Strapi Version: 3.6.8
  • Operating System: Ubuntu 20.04
  • Node Version: 14.9.0

So i’m trying to wrap my head around CORS, and I can’t find a solution. I have a react frontend sending request to my Strapi backend, which are on two seperate servers. I only get the CORS message “Access to XMLHttpRequest at ‘’ from origin ‘’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”, when sending a POST request.
I’ve got no problems doing it at locally.
I’ve seen on other posts it is possible to change the cors settings in the config/middleware.js file. I’ve tried this with the following:

  settings: {
    cors: {
      enabled: true,
      origin: ['*']
    },
  },

I originaly didn’t have the middleware.js file in the project.
I’ve also tried some different this with the frontend to see if that would work (I’m using axios to send requests), but with no success.
Anyone with a possible solution?

Did you find a solution?, I’ve tried the same but no luck