Skip to content

How to get remote address header in request? #318

Closed Answered by fafhrd91
shivshankardayal asked this question in Q&A
Discussion options

You must be logged in to vote

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

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@shivshankardayal
Comment options

Answer selected by shivshankardayal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants