when dgs is running behind a reverse proxy, the graphiql is not working:
When dgs is accessed directly, the graphiql is working.
When dgs is accessed from reverse proxy, the graphiql should work as well.
When dgs is accessed from reverse proxy, the graphiql stopped working.
Steps to reproduce
- set up nginx as a reverse proxy, point
/datato the backend dgs service (assume it’s
- access graphiql from http://<nginx_server>/data/graphiql
Note: A test case would be highly appreciated, but we understand that’s not always possible
this would assume the graphql is at the root, which won’t be true with an existence of reverse proxy.
The solution is to change that path to a relative path as
The fix is to point dgs graphiql at the relative path instead of root:
With MR: #1204, and bump dgs version to
5.2.1, it’s now working both w/ and w/o reverse proxy.