esosedi / regions

Module for Yandex, Google, Leaflet, D3 and other JS Maps with build in ability to display any region of the world. Or even an entire world. Based on OpenStreetMap and other sources

Home Page:http://data.esosedi.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORS?

Disorrder opened this issue · comments

Привет. А этот метод можно использовать на сайте? У меня, вот, ругается...
XMLHttpRequest cannot load http://data.esosedi.org/regions/v1/?lang=ru_60189&type=coast. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:1000' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
На Node.js работает, в jsFiddle работает, в браузере, вот не хочет.

Нашёл проблему. Я использую Webpack, поэтому пришлось сделать

const osme = require('osme/regions.js');

👍 (за всем не уследить, сори)