Hello,
I’m trying to connect grafana with my web API. but I got a CORS problem did anyone know how to solve it.
Nicolas
Hello,
I’m trying to connect grafana with my web API. but I got a CORS problem did anyone know how to solve it.
Nicolas
Hi @nicolasdossantos248 cors problems must be solved in your web API. It is your web API that should return the correct headers for it to work, more specifically the access-control-allow-origin. This has nothing to do with Grafana, this is the way brower’s security work
That being said, you should avoid querying your web api directly from the browser in your plugin and you should instead use proxy routes in your plugin so it is the grafana backend that fetches data from your API instead of the browser directly. You can read more about this here Add authentication for data source plugins | Grafana documentation
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.