I'm trying to configurate regionmap in a kibana instance that are running in local. AlWays kibana return the same error:
"Cannot download http://localhost:8000/example1.geojson file. Please ensure the CORS configuration of the server permits requests from the Kibana application on this host."
the configuration in kibana is like is talking about in documentation:
regionmap:
layers:
- name: "bcn-barris"
url: "http://localhost:8000/example1.geojson"
fields:
- name: "name"
description: "example1"
I tryied many ways:
- Install with npm http-server and try to start locally using next comand:
http-server --cors='*' -p 8000
server starts correctly but when i try to recover from kibana, errors happends.
- Trying to use the same kibana server to serve geojson files.
I copied my file, example1.geojson into [kibana_install_dir]\optimize\bundles. The efect is that i can serve my files throw the next url: http://localhost:5601/bundles/example1.geojson
but again the same message apears.
- trying to serve this files from a local apache installation. I follow the instructions about enable CORS configuration in apache here: https://enable-cors.org/server_apache.html
but... the same error apear again.
Iin my opinion the most strange thing is the results of test 2. If files are served by the kibana itself, how is possible that kibana informs that CORS configurations are incorrect? In theory, its not necessary..
Someone have any idea about this?
NOTE: my geojson example file:
{
"type": "featurecollection","features":
[
{"geometry":
{
"type": "Polygon","coordinates":
[ [ [ 2.170043729484323, 41.385469682357026 ], [ 2.170646546404706, 41.384582451354724 ], [ 2.17169812114231, 41.383034680820707 ], [ 2.171721788433596, 41.38299986580229 ], [ 2.172079138962279, 41.382473855563589 ], [ 2.173153085415748, 41.381267761526225 ], [ 2.173279717777688, 41.381125540970139 ], [ 2.174070411173343, 41.380237514008698 ], [ 2.174156532470374, 41.38014079621172 ], [ 2.174702416595381, 41.379508939677599 ], [ 2.175102871988755, 41.379045416586109 ], [ 2.175434539702061, 41.378770936167498 ], [ 2.175525595152453, 41.378645860880646 ], [ 2.175750799837658, 41.378266246911593 ], [ 2.175774001266169, 41.378226338428767 ], [ 2.176004276787348, 41.377830348485041 ], [ 2.176859121497912, 41.376712681047344 ], [ 2.177529964265944, 41.375986773209675 ], [ 2.177459865008629, 41.375904979470981 ], [ 2.177430007884441, 41.375854387023374 ], [ 2.177421806534602, 41.375836169235505 ], [ 2.177412479879368, 41.375810449132892 ], [ 2.177405239139924, 41.375784320574461 ], [ 2.177400130329009, 41.375757928009932 ], [ 2.177397277882313, 41.375732785595829 ], [ 2.177395913070557, 41.375718661026063 ], [ 2.177395668064563, 41.375702977142488 ], [ 2.177396750322672, 41.375687302739507 ], [ 2.177399087079453, 41.375671718365233 ], [ 2.177402737667065, 41.37565626047359 ], [ 2.177407617022675, 41.375641036547364 ], [ 2.17741378527223, 41.375626019993248 ], [ 2.177421157126235, 41.37561133630745 ], [ 2.177429707648887, 41.37559706637947 ], [ 2.177440350532638, 41.375581874611242 ], [ 2.177451871440106, 41.375569130157658 ], [ 2.177463334928529, 41.375558096726152 ], [ 2.177475711869486, 41.375547646300447 ], [ 2.177489001809342, 41.37553781490719 ], [ 2.177527920955122, 41.375512592511896 ], [ 2.177368674811844, 41.375315694131736 ], [ 2.178514078514669, 41.374813646944524 ], [ 2.178863570083496, 41.374660462020167 ], [ 2.178198973635043, 41.373831855176135 ], [ 2.183129944772675, 41.371597187350638 ], [ 2.182076281291919, 41.370277966004636 ], [ 2.177634929704094, 41.372297761678865 ], [ 2.177614333511908, 41.372359910811646 ], [ 2.176900099857641, 41.372679386245231 ], [ 2.176837740710422, 41.372716321858093 ], [ 2.176840639055876, 41.372817533369535 ], [ 2.176392517268402, 41.373023421638763 ], [ 2.175659529124863, 41.373360202797507 ], [ 2.175604097977219, 41.373390053348174 ], [ 2.176383505725734, 41.374346520733447 ], [ 2.175185211795379, 41.374649848827033 ], [ 2.173212370985966, 41.374795225646182 ], [ 2.17273057949106, 41.374828741656138 ], [ 2.172707192502348, 41.374830366153709 ], [ 2.171899439431534, 41.374890531879117 ], [ 2.170051618057805, 41.375016297250923 ], [ 2.169607999630712, 41.375001398517597 ], [ 2.168556084849286, 41.374950077070245 ], [ 2.167846940486142, 41.374984426038189 ], [ 2.167631577590614, 41.375179234037795 ], [ 2.167436772941477, 41.375372857137883 ], [ 2.166534400216464, 41.376049380640019 ], [ 2.166096012986182, 41.376398996302854 ], [ 2.166073541448239, 41.376416911709924 ], [ 2.165456405712666, 41.376909639221537 ], [ 2.164669021662576, 41.377535701177933 ], [ 2.164663202578018, 41.377540000600945 ], [ 2.164340073277919, 41.377778733972569 ], [ 2.163231995036594, 41.37864996742433 ], [ 2.163109537905787, 41.378742197456972 ], [ 2.163340640890831, 41.380337462535813 ], [ 2.163339382538923, 41.380435716563454 ], [ 2.163476122417851, 41.381350235777418 ], [ 2.163520009310038, 41.381669988629028 ], [ 2.163582129272874, 41.382120014670811 ], [ 2.163613537309763, 41.382348691755389 ], [ 2.163621275051269, 41.382398208297836 ], [ 2.163869049222712, 41.384131830964392 ], [ 2.163881145517049, 41.384216481452789 ], [ 2.164027258079788, 41.385248336473495 ], [ 2.164045965178077, 41.385401483101276 ], [ 2.164846888163389, 41.385916156566701 ], [ 2.170043729484323, 41.385469682357026 ] ] ]
},"type": "Feature", "properties": {"N_Distri": "Ciutat Vella"}
}
]
}
regards!