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 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 endpoint is closed to any JS that isn’t hosted on
For it to become accessible it should return CORS HTTP headers.

cc @danielmai @darkn3rd