How to get remote address header in request? #318
-
I am trying to get remote address of a request but when I dump the request there is no such header. How can I find it? |
Beta Was this translation helpful? Give feedback.
Answered by
fafhrd91
Mar 27, 2024
Replies: 1 comment 1 reply
-
usually “host” header contains remote addr. you can get real remote ip addr via https://docs.rs/ntex/latest/ntex/web/struct.HttpRequest.html#method.peer_addr |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shivshankardayal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usually “host” header contains remote addr.
you can get real remote ip addr via https://docs.rs/ntex/latest/ntex/web/struct.HttpRequest.html#method.peer_addr
but that could be address of proxy