I’ve done a really basic installation of DGraph that looks a little something like this:
- Spun up a DigitalOcean droplet
- Installed Docker
dgraph/dgraph:latest with docker-compose
My docker compose file looks like:
command: dgraph zero --my=zero:5080
command: dgraph alpha --my=alpha:7080 --zero=zero:5080
I’m able to connect to the Ratel UI via http://xxx.xxx.xx.xxx:8000 and play around just fine, however I cannot connect via https://play.dgraph.io/
Additionally, opening up the GraphQL endpoint in Altair (via browser extension) or any other GraphQL UI doesn’t work either.
Am I missing something? Any help is appreciated.
More precisely whitelist=*.dgraph.io
@star no luck. The whitelist doesn’t seem to like
*.dgraph.io. I also tried specifically both
188.8.131.52 and it still doesn’t work.
After some more debugging, it looks like it’s a CORS issue. Now to figure out how to fix that…
Anyways finally had some time to take another crack at this. I notice the CORs issues were due to
I figured it was because I was connecting from https://play.dgraph.io/ to http://xxx.xxx.xx.xxx:8000, meaning, it went from HTTPS to HTTP, so the referrer header was lost due to the policy.
To fix this, I went ahead and set up my server with a domain and SSL cert. After doing so, connecting from https://play.dgraph.io/ to https://my-domain.com/dgraph totally works as expected.
And also consequently, connecting from a GraphQL client (like Altair) works as well