Thanks for the reply.
I’m using GitHub - FiloSottile/mkcert: A simple zero-config tool to make locally trusted development certificates with any names you'd like. to generate the certs.
I’ve added them to the keystore and they show up in Chrome. The certs work fine for the other services that are running on ssl.
This is the console:
This is the connection settings:
const httpLink = new HttpLink({
uri: "https://dgraph.platformdev.com/graphql", // Or your Slash GraphQL endpoint (if you're using Slash GraphQL)
})
const wsLink = process.browser
? new WebSocketLink({
uri: `wss://dgraph.platformdev.com/graphql`, // Can test with your Slash GraphQL endpoint (if you're using Slash GraphQL)
options: {
reconnect: true,
},
})
: null
const withApollo = nextWithApollo(
({ initialState, headers }) => {
return new ApolloClient({
ssrMode: typeof window === "undefined",
link: splitLink,
headers: {
...(headers as Record<string, string>),
},
cache: new InMemoryCache().restore(initialState || {}),
})
},
Here is the nginx for the dgraph endpoint:
upstream dgraph {
# Enumerate all upstream servers here
#sticky;
ip_hash;
server localhost:8080;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server
{
listen 443 ssl;
server_name dgraph.platformdev.com;
access_log /usr/local/var/log/nginx/app/access.log;
error_log /usr/local/var/log/nginx/app/error.log;
ssl_certificate /usr/local/etc/nginx/ssl/platformdev.crt.pem;
ssl_certificate_key /usr/local/etc/nginx/ssl/platformdev.key.pem;
# Only retry if there was a communication error, not a timeout
# on the Tornado server (to avoid propagating "queries of death"
# to all frontends)
proxy_next_upstream error;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $http_host;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://dgraph;
}
location = /50x.html {
root /usr/share/nginx/html;
}
}
My schema:
# Dgraph.Allow-Origin "http://localhost:3000"
# Dgraph.Allow-Origin "https://app.platformdev.com"
Please let me know if I have missed something.
Appreciate your time!
Thanks
