How to solve CORS policy problem for Strapi?

In my case, I was missing to add the protocol, after adding http:// the cors error stopped.