I want to enable cors on grafana so that I can make POST requests on react APP using grafana API. My problem is that I can't setup cors on grafana.
I tried editing grafana's defaults.ini file, but the problem of CORS not being enabled still exists. How to enable cors in Grafana?
As discussed, there is no built-in CORS in Grafana here and repeated many times.
You need to set up a reverse proxy to handle CORS for you. A general example of nginx configuration can be found here.
Obviously nginx is just a suggestion: you can use any reverse proxy you like.
Official reference on how to configure Grafana to run behind a reverse proxy here.