Get.dgraph.io/latest should allow CORS requests

Moved from GitHub dgraph/5628

Posted by paulftw:

In-browser JS applications need to be able to read latest dgraph version from the get.dgraph.io/latest endpoint.

Examples when it can be useful:

  • Ratel could warn admins when newer version of Dgraph is available
  • Interactive Dgraph tour could auto-generate docker-compose file with latest image baked in
  • etc.

Right now get.dgraph.io/latest endpoint is closed to any JS that isn’t hosted on get.dgraph.io/.
For it to become accessible it should return CORS HTTP headers.

cc @danielmai @darkn3rd