graphql-engine
graphql-engine copied to clipboard
X-Forwarded-For header missing in remote schema request
Hi, I am using Python Graphene-based remote schema behind Hasura to implement business logic.
I need to check clients' IP in my backend, and expect Hasura to provide X-Forwarded-For header. But the header is not sent over.
I am not printing all the headers here, but I have X-Forwarded-User-Agent (my client's browser UA) and X-Forwarded-Host (i.e. address of Hasura itself), but not the IP address of the client (X-Forwarded-For).
Two related issues (closed): https://github.com/hasura/graphql-engine/issues/2572 - this was a request about X-Forwarded-User-Agent that I have thanks to this issue https://github.com/hasura/graphql-engine/issues/4770 - about triggers and actions, but not remote schema. Actions send X-Forwarded-For
I would like to ask developers to add X-Forwarded-For header with client IP to remote schema when possible. Many thanks!
Can you try to enable "Forward client headers"?
See: https://github.com/hasura/graphql-engine/issues/4770#issuecomment-661090478
Can you try to enable "Forward client headers"?
See: #4770 (comment)
This option is enabled, but no header is sent.
I have the same requirement and I'm also not seeing all the client headers forwarded when "Forward client headers" is checked. In my case, this is just for an Action. Thanks
Can confirm this is an issue with remote schema: No X-Fowarded-For
header is passed over.
Moved the project to Hasura 2.0.9 from Hasura 1.3.3 - the problem still exists, no way to find client IP address in remote schema, no x-forwarded-for header.
still hoping this issue been solved
Any updates? Are there any workarounds on how to access the original 'User-Agent' header in the webhook?