Skip to content

Access RemoteAddr inside of TraceLayer #428

Answered by davidpdrsn
mystborn asked this question in Q&A
Discussion options

You must be logged in to vote

You don’t need the Extension extractor. You can just do request.extensions().get::<ConnectInfo<SocketAddr>>()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mystborn
Comment options

@davidpdrsn
Comment options

Answer selected by mystborn
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