Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get insecure_ip from request #14

Open
AlanLang opened this issue Jul 2, 2023 · 1 comment
Open

get insecure_ip from request #14

AlanLang opened this issue Jul 2, 2023 · 1 comment

Comments

@AlanLang
Copy link

AlanLang commented Jul 2, 2023

Thanks for such a useful code,but i want to get insecure_ip from request like:

    let remote_addr = req
        .extensions()
        .get::<axum::extract::ConnectInfo<SocketAddr>>()
        .map(|ci| ci.0);

But I don't know how to code,Looking forward to your answer, thank you

@imbolc
Copy link
Owner

imbolc commented Jul 3, 2023

Extractors implement FromRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants