How to solve CORS policy problem for Strapi?

You could try to allow CORS for any host, just to be sure that the problem is caused by cors or you should investigate something else.

./config/middleware.js

module.exports = {
  //...
  settings: {
    cors: {
      origin: ['*'], //allow all
    },
  },
};

You still can create different folders per environment. The folder got renamed from environment to env.

This is the current structure if you want to create different configs per envs:
./config/env/{env}/{filename}