2 stable releases
Uses new Rust 2024
| new 1.0.1 | Feb 25, 2026 |
|---|---|
| 1.0.0 | Jan 17, 2026 |
#7 in #axum-extractor
Used in mogh_auth_server
19KB
415 lines
This library includes an axum extractor for client ip, [RequestIp], as well as functions to help with extracting the client ip from requests.
Mogh Request IP
Axum extractor for client request IP.
// Use as axum extractor
async fn auth_request(
RequestIp(ip): RequestIp,
req: Request
) -> mogh_error::Result<String> {
println!("Client IP: {ip:?}");
Ok(ip.to_string())
}
Dependencies
~9–13MB
~161K SLoC