Opened 7 years ago

Closed 7 weeks ago

#5081 closed enhancement (wontfix)

Add CORS headers to allow Cross-site AJAX calls

Reported by: ikonor Owned by: osm@…
Priority: minor Milestone:
Component: yours Version:
Keywords: Cc:

Description

It seems like yournavigation.org is still the only Routing API that is open (no API key) and has a simple, straightforward API. So it's ideal for testing and demo purposes.

It would be even simpler to use if there was no need for a proxy with JavaScript-only clients. Adding CORS (Cross-origin resource sharing) response headers to the php scripts would allow direct requests from JavaScript (except older IEs):

header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: X-Yours-client");

My use case is a demo hosted on GitHub gh-pages:
direct requests - denied by Browser
remote proxy (temporary test) - requests allowed to proxy on remote host because of CORS headers

Change History (2)

comment:1 Changed 6 years ago by ikonor

Moved the demo to a gist, updated links:
direct requests - denied by Browser
remote proxy (temporary test) - requests allowed to proxy on remote host because of CORS headers

comment:2 Changed 7 weeks ago by mmd

Resolution: wontfix
Status: newclosed

YOURS project is no longer active, closing.

Note: See TracTickets for help on using tickets.