# Handle cors issues

**URL:** <https://community.grafana.com/t/handle-cors-issues/17820>\
**Category:** Grafana\
**Created:** [May 29, 2019, 8:23pm UTC](https://community.grafana.com/t/handle-cors-issues/17820 "2019-05-29T20:23:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnzballad](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/johnzballad/32/7216_2.png) [@johnzballad](https://community.grafana.com/u/johnzballad)\
**Post date:** [May 29, 2019, 8:23pm UTC](https://community.grafana.com/t/handle-cors-issues/17820/1 "2019-05-29T20:23:06Z")

</div>

I have found several issues on Grafana’s Github page. However, none of them worked.  
I’m using nginx (actually is [nginx-proxy by jsonwilder](https://github.com/jwilder/nginx-proxy))

What I want to do:

Consume Grafana API from my very own backend/frontend. I’m creating a system that will consume grafana api and load render images from selected dashboard (and panels) and send a e-mail with them.

What issues i’m having:

CORS problem. I can’t consume Grafana API from my backend and from my frontend cuz of cors.

What I’m trying to do:

Using nginx reverse proxy I can’t set the CORS header to enable the communication. However, the reverse proxy seems to be working OK. When I send request to the nginx-proxy, they are redirected to grafana endpoint and everything works.

Howerver, I can’t assure if the header is been setted.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/jangaraj/32/39197_2.png) [@jangaraj](https://community.grafana.com/u/jangaraj)\
**Post date:** [May 29, 2019, 9:25pm UTC](https://community.grafana.com/t/handle-cors-issues/17820/2 "2019-05-29T21:25:10Z")

</div>

Generic answer (because no exact request/error is provided):

[https://enable-cors.org/server\_nginx.html](https://enable-cors.org/server_nginx.html)

You may need to customize this config - check preflight request what is requested and customize accordingly.
