golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

Public API endpoints are blocked by browsers due to CORS #592

Open chrismwendt opened 5 years ago

chrismwendt commented 5 years ago

API endpoints on gddo do not return CORS headers to allow requests from other domains in browsers. For example, the importers endpoint is not accessible from other domains:

https://api.godoc.org/importers/github.com/gorilla/mux

One way to get around this is by setting up a proxy between the browser and gddo. It would be convenient if gddo added CORS headers, so that there would be no need for a proxy.