[OSM-dev] cross-domain xmlhttprequest

Stephan Plepelits skunk at xover.htu.tuwien.ac.at
Tue Dec 22 11:08:40 GMT 2009


Hi Folks!

I just ran into a problem ... I'd like to access OpenStreetMap data
directly from a web application via a XMLHttpRequest. Unfortunately
cross-domain XMLHttpRequests are not allowed unless the foreign web server
replies with a special HTTP-header (Access-Control-Allow-Origin) and you
are using a modern browser (e.g. Firefox >=3).

Here you can find some documentation:
  http://www.w3.org/TR/access-control/

This is the needed HTTP-header-line:
Access-Control-Allow-Origin: *
(this would allow XMLHttpRequests from any client web browser)

Does anybody see a problem adding these HTTP-Header-line to the
OpenStreetMap-API and the Nominatim-API?

greetings,
        Stephan
-- 
Seid unbequem, seid Sand, nicht Öl im Getriebe der Welt! - Günther Eich
,---------------------------------------------------------------------.
| Stephan Plepelits,                                                  |
| Technische Universität Wien   -    Studien Informatik & Raumplanung |
| Projects:                                                           |
| > openstreetbrowser.org > couchsurfing.org > tubasis.at > bl.mud.at |
| Contact:                                                            |
| > Mail: skunk at xover.mud.at > Blog: plepe.at > Jabber: skunk at fsinf.at|
| > Twitter: twitter.com/plepe > Wave: plepelits at googlewave.com       |
`---------------------------------------------------------------------'




More information about the dev mailing list