Cannot connect to GraphQL endpoint

Hey all

I’ve done a really basic installation of DGraph that looks a little something like this:

  1. Spun up a DigitalOcean droplet
  2. Installed Docker
  3. Ran dgraph/dgraph:latest with docker-compose

My docker compose file looks like:

version: "3.2"
    image: dgraph/dgraph:latest
      - /mnt/volume_xxxxx:/dgraph
      - 5080:5080
      - 6080:6080
    restart: on-failure
    command: dgraph zero --my=zero:5080
    image: dgraph/dgraph:latest
      - /mnt/volume_xxxxx/dgraph:/dgraph
      DGRAPH_ALPHA_ACL: secret-file=./secret_file
      DGRAPH_ALPHA_SECURITY: whitelist=,,
      - 8080:8080
      - 9080:9080
    restart: on-failure
    command: dgraph alpha --my=alpha:7080 --zero=zero:5080
    image: dgraph/ratel:latest
      - 8000:8000
    command: dgraph-ratel

I’m able to connect to the Ratel UI via and play around just fine, however I cannot connect via

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.

Try whitelist=
More precisely whitelist=*

@star no luck. The whitelist doesn’t seem to like * I also tried specifically both and 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… :thinking:

Anyways finally had some time to take another crack at this. I notice the CORs issues were due to Referrer-Policy: no-referrer-when-downgrade.

I figured it was because I was connecting from to, 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 to totally works as expected.

And also consequently, connecting from a GraphQL client (like Altair) works as well :+1:

More about this