# Custom region map cors error

**URL:** <https://discuss.elastic.co/t/custom-region-map-cors-error/191050>\
**Category:** Kibana\
**Created:** [July 17, 2019, 3:51pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050 "2019-07-17T15:51:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sravanthi\_N\_S\_CH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sravanthi_n_s_ch/32/50473_2.png) [@Sravanthi\_N\_S\_CH](https://discuss.elastic.co/u/Sravanthi_N_S_CH)\
**Post date:** [July 17, 2019, 3:51pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/1 "2019-07-17T15:51:07Z")

</div>

I am running kibana in docker. I am serving geojson file using simplehttpserver in python. I tried different options by enabling cors, but I have trouble getting this work in Kibana. The last option I tried is to run the python server in docker instance where kibana is running. No luck from any of this. Kindly help me fix this issue. Is there any configuration I am missing ?

---

<div class="post-metadata">

**Author:** ![Sravanthi\_N\_S\_CH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sravanthi_n_s_ch/32/50473_2.png) [@Sravanthi\_N\_S\_CH](https://discuss.elastic.co/u/Sravanthi_N_S_CH)\
**Post date:** [July 17, 2019, 4:45pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/2 "2019-07-17T16:45:06Z")

</div>

When I monitored the network tab, I could see 200 response for fetching the geojson file, but there is a warning popup saying there is cors error

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [July 17, 2019, 11:50pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/3 "2019-07-17T23:50:10Z")

</div>

You'll probably want to update `server.cors.origin` in your config/kibana.yml.

---

<div class="post-metadata">

**Author:** ![Sravanthi\_N\_S\_CH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sravanthi_n_s_ch/32/50473_2.png) [@Sravanthi\_N\_S\_CH](https://discuss.elastic.co/u/Sravanthi_N_S_CH)\
**Post date:** [July 18, 2019, 2:51am UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/4 "2019-07-18T02:51:02Z")

</div>

@lukas I tried the configuration you mentioned and I still have the same issue.  
My kibana config looks like below

```
server.cors : true
server.cors.origin: ["*"]
server.cors.additionalHeaders: ["kbn-version", "cookie"]
server.cors.credentials: true
regionmap:
 layers:
    - name: "Nepal"
      url: "http://localhost:8000/nepal.geojson"
      attribution: "exploratory.io"
      fields:
          - name: "NAME"
            description: "Name"
```

---

<div class="post-metadata">

**Author:** ![Sravanthi\_N\_S\_CH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sravanthi_n_s_ch/32/50473_2.png) [@Sravanthi\_N\_S\_CH](https://discuss.elastic.co/u/Sravanthi_N_S_CH)\
**Post date:** [July 19, 2019, 6:02pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/5 "2019-07-19T18:02:20Z")

</div>

Generated a new geojson file and restarted my docker instance. After this, I got this working. But, one feedback is to change the warning pop up message which is misleading. The message is common for all the errors which is why, I wasted my time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 16, 2019, 6:02pm UTC](https://discuss.elastic.co/t/custom-region-map-cors-error/191050/6 "2019-08-16T18:02:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
