# Custom regionmap not working

**URL:** <https://discuss.elastic.co/t/custom-regionmap-not-working/229553>\
**Category:** Kibana\
**Created:** [April 23, 2020, 10:21pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553 "2020-04-23T22:21:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zakwan\_hajjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zakwan_hajjar/32/67009_2.png) [@Zakwan\_hajjar](https://discuss.elastic.co/u/Zakwan_hajjar)\
**Post date:** [April 23, 2020, 10:21pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/1 "2020-04-23T22:21:10Z")

</div>

I get error “Cannot download [https://d1lbavwamyyh16.cloudfront.net/kibana/us\_counties\_with\_states.geojson](https://d1lbavwamyyh16.cloudfront.net/kibana/us_counties_with_states.geojson) file. Please ensure the CORS configuration of the server permits requests from the Kibana application on this host.” although I don’t see any error in the console and there is a valid response (See the attached screenshot). Please advise.

![PastedGraphic-1](https://us1.discourse-cdn.com/elastic/original/3X/e/3/e3e61f8fe39a1a3c4a32c3e1c4682db78f5c84af.png)

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [April 23, 2020, 10:48pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/2 "2020-04-23T22:48:15Z")

</div>

In the [blog post](https://www.elastic.co/cn/blog/custom-region-maps-in-kibana-6-0) we give an example of using `http-server --cors='*' -p 8000` . But I've found that `http-server --cors="kbn-version" -p 8000` works better. You'll probably want to update `server.cors.origin` in your config/kibana.yml.

There were other discuss posts which had the same solution: [CORS problem in Kibana Map](https://discuss.elastic.co/t/cors-problem-in-kibana-map/193710/5)

relevant ticket: [https://github.com/elastic/kibana/issues/23904](https://github.com/elastic/kibana/issues/23904)

hopefully this works, good luck

Rashmi

---

<div class="post-metadata">

**Author:** ![Zakwan\_hajjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zakwan_hajjar/32/67009_2.png) [@Zakwan\_hajjar](https://discuss.elastic.co/u/Zakwan_hajjar)\
**Post date:** [April 23, 2020, 11:01pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/3 "2020-04-23T23:01:20Z")

</div>

Hi Rashmi,

I read all the tickets that are related to my issue and none of them worked with me. Unfortunately, your reply is unhelpful as well. If you check my geojson link, you can notice that I already enabled CORS and added kbn-version.

Also, adding `server.cors.origin` in kibana.yml is not working too because it's not allowing to do that and gives me error "'server.cors.origin': is not allowed".

I hope that someone robust from Elastic team can investigate this issue and answer me. I noticed many people face the same problem without any solution.

Thank you,

---

<div class="post-metadata">

**Author:** ![Zakwan\_hajjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zakwan_hajjar/32/67009_2.png) [@Zakwan\_hajjar](https://discuss.elastic.co/u/Zakwan_hajjar)\
**Post date:** [April 23, 2020, 11:07pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/4 "2020-04-23T23:07:42Z")

</div>

@Aaron_Caldwell

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [April 24, 2020, 10:06pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/5 "2020-04-24T22:06:51Z")

</div>

Hello Zakwan,

> If you check my geojson link, you can notice that I already enabled CORS and added kbn-version.

Doing a test `GET` against your server providing GeoJSON, I'm not seeing anything like the following in the response-headers:

`Access-Control-Allow-Headers: origin,x-requested-with,content-type,accept,range,kbn-version`

That second link that @rashmi provided, which you also commented on provides a link on how to configure this setting on one server, but the specifics of how to do it are likely different for your server. With regard to your comment there on reopening the issue, let's hold off that until we've firmly established there's a common issue that others are likely to experience.

For your response headers, if you believe differently, could you please provide a screenshot of what you're seeing?

Some of the other guidance in that issue is also still good. Is there any chance you can update to \> 6.5? Even better, if you can use a version newer than 6.7, you'd get access to [the new Maps App](https://www.elastic.co/guide/en/kibana/current/maps.html) which will be replacing the map product you're using now in the long run and receives more frequent improvements and updates.

Regards,  
Aaron

---

<div class="post-metadata">

**Author:** ![Zakwan\_hajjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zakwan_hajjar/32/67009_2.png) [@Zakwan\_hajjar](https://discuss.elastic.co/u/Zakwan_hajjar)\
**Post date:** [April 25, 2020, 6:33am UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/6 "2020-04-25T06:33:38Z")

</div>

I updated to 6.8.8 and it works well.

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [April 27, 2020, 5:07pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/7 "2020-04-27T17:07:02Z")

</div>

Glad it worked for you on 6.8.8.

Rashmi

---

<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:** [May 25, 2020, 5:17pm UTC](https://discuss.elastic.co/t/custom-regionmap-not-working/229553/8 "2020-05-25T17:17:43Z")

</div>

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