Hi everyone,
I have to save all request ip address and user-agent.
Because all request is behind aws load balancer, so i can see original ip address in "x-forwarded-for" in headers. But user-agent is always "hasura-graphql-engine/v1.0.0-alpha44"
How can I forward original user-agent. Thank you very much.
Thanks, we will add this as soon as possible.
Fantastic!
That's great!
@tirumaraiselvan @0x777 this is a great enhancement to use with auth systems.
~Thanks for the suggestions everyone. This is going to be part of the upcoming release: https://github.com/hasura/graphql-engine/pull/2753~
Update: Sorry, we will need to do this in a separate PR because there are some nuances as to the name of the header in which we need to pass in the original User-Agent.
Do we have any update? @tirumaraiselvan @RodolfoSilva
Thanks.
@danghung-dev No, I don't. Maybe @tirumaraiselvan.
@danghung-dev Sorry for the delay. We will definitely make it part of the next release.
@tirumaraiselvan thanks. :P
Do we have any update? @tirumaraiselvan
@lexi-lambda Can we call this X-Hasura-Original-User-Agent and close this case? Not sure if this needs to be thought more than fixing a convention.
Personally, I think we should just use X-Forwarded-User-Agent. It’s consistent with the meaning of the other de-facto standard headers like X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto, and it’s extremely unlikely to cause any trouble.
On a semi-tangential note, until very recently, I thought proprietary headers were supposed to be prefixed by X-, but I recently found out that convention was deprecated in 2012 in RFC 6648. So if we introduce Hasura-specific headers in the future, we should probably just prefix them with Hasura-, not X-Hasura-… but in this case I think X-Forwarded- is still the natural prefix to use here by convention.
Hello @tirumaraiselvan,
Do we have any update?
@danghung-dev Sorry for the delay! Have raised a PR here #3347
Will make sure it gets out in the next release.
@tirumaraiselvan Happy new year !!!
I do not see X-Forwarded-Host and X-Forwarded-User-Agent when sent event. How can I add it to there?
As I said above I have log who change value in database.
I have to save all request ip address and user-agent.

@danghung-dev That's true. We only added the headers for remote schemas. I don't see a reason why we shouldn't add them for event triggers as well. Could you open an issue for the same?
Actually, now that I think more about it. It might be much harder to add them for event triggers. This is because event trigger payloads are generated by the database and are only aware of hasura session variables i.e x-hasura-* variables. Any other client side information is unavailable.
Most helpful comment
@danghung-dev Sorry for the delay. We will definitely make it part of the next release.