Against v1.0.8 running in k8s (GKE) via the kubectl proxy:
curl -v -H "Origin: http://localhost:8000" -H "Referer: http://locahost:8080/" "http://localhost:8080/api/v1/namespaces/dgraph/services/dgraph-server:8080/proxy/health?debug=true"
> GET /api/v1/namespaces/dgraph/services/dgraph-server:8080/proxy/health?debug=true HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> Origin: http://localhost:8000
> Referer: http://locahost:8080/
>
< HTTP/1.1 200 OK
< Audit-Id: 9e8da082-e575-4d61-bc21-6615bdadbb8e
< Content-Length: 2
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 07 Sep 2018 16:35:19 GMT
<
No Access-Control-Allow-Origin
header is returned
From the browser (Safari) console:
[Error] Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.
[Error] Failed to load resource: Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin. (keywords, line 0)
[Error] Fetch API cannot load http://localhost:8080/api/v1/namespaces/dgraph/services/dgraph-server:8080/proxy/ui/keywords?debug=true. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.
[Error] Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.
[Error] Failed to load resource: Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin. (health, line 0)
[Error] Fetch API cannot load http://localhost:8080/api/v1/namespaces/dgraph/services/dgraph-server:8080/proxy/health?debug=true. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.
There are no CORS headers returned.