search

Home  >  Q&A  >  body text

CORS in Grafana API

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?

P粉274161593P粉274161593350 days ago555

reply all(1)I'll reply

  • P粉147045274

    P粉1470452742024-03-29 00:56:55

    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< /a>.

    reply
    0
  • Cancelreply