How do I set headers the react-dom/server renderToString passes to graphql server?

437 views Asked by At

I have a webserver which receives the client's IP from the load balancer via the X-Forwarded-For header, but does not forward it to the GraphQL server, making debugging more difficult.

Is it possible to turn this on, or would it require a patch to react-dom/server? How have others solved the problem of gathering contextual data in the graphql server request logs when they are triggered by a server-side-renderer?

1

There are 1 answers

0
Andrey Fedorov On BEST ANSWER

I'll dig into the source shortly to verify, but it doesn't seem like this is actually possible at this time.