I'm trying to make use of the overpass API http://wiki.openstreetmap.org/wiki/Overpass_API with a JavaScript XMLHttpRequest in a project running on Django but I keep getting the
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.google.com/accounts/ClientLogin. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
error. I get this error whether I'm using GET or POST, and from any other host, not just the overpass API.
I've installed django-cors-headers https://github.com/ottoyiu/django-cors-headers and followed the instructions there, putting 'corsheaders' into INSTALLED_APPS, and 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', into MIDDLEWARE_APPS and I've set
CORS_ORIGIN_ALLOW_ALL = true
in settings.py but nothing seems to work. I'm running it locally with
python manage.py runserver
but I'm also hosting it on openshift. Neither on of these work, they both give the error above.
Please let me know if I am missing anything here.