whosonfirst / whosonfirst-www-spelunker

A simple Flask-based spelunker for poking around Who's On First data
BSD 3-Clause "New" or "Revised" License
7 stars 9 forks source link

Add CORS headers to API search endpoint #56

Closed alukach closed 7 years ago

alukach commented 8 years ago

This PR is to enable cross-origin requests to be made to the /api/search endpoint. This is useful for building front-end tooling that consumes the API search endpoint whilst being hosted on other domains. I'm not sure if this is the intended use-case for this endpoint. If the goal is to allow third-parties to search WOF data by properties, it may be best to expose the ES server to GET requests directly (reduced burden on the Python server, lower latency, greater query abilities).

Much of this is duplicate from an email earlier sent to hello@mapzen.com. Apologies if this is redundant.

thisisaaronland commented 7 years ago

Thanks!