Hi there.
I'm ran a self hosted OSM tile server with this repo. map is working well and functional and accessible with leaflet demo.
when I use tile map link ( http://map.company.org:8080/tile/{z}/{x}/{y}.png
) for serving tiles in Kibana map, no tile loaded and browser console print below error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://map.company.org:8080/tile/65535/65536/17.png. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)
I'm digging issues and forums and trying almost all tips and problem is not solved. some of tips:
- add ALLOW_CORS=enabled flag when running docker that add "Header set Access-Control-Allow-Origin "*"" into apache conf.
- put map server behind reverse proxy and manipulate headers with nginx and dd some headers like this:
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;- change kibana CORS settings; server.cors.enabled.
- tiles can be downloded in browser without any problem and 'Access-Control-Allow-Origin' '*' is exist in headers.
- and etc ... .
I'm so confused and glad to be get help with you, thanks.
ES version: 7.15.1
Kibana version: 7.15.1