mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-10-30 16:38:06 +01:00
Update axum-client-ip to 1.1.3
This commit is contained in:
@@ -17,7 +17,7 @@ use axum::{
|
||||
Router,
|
||||
routing::get,
|
||||
};
|
||||
use axum_client_ip::SecureClientIp;
|
||||
use axum_client_ip::ClientIp;
|
||||
use axum_extra::headers;
|
||||
use axum_extra::TypedHeader;
|
||||
use clap::Parser;
|
||||
@@ -463,7 +463,7 @@ async fn handle_default_route(
|
||||
State(arc_state): State<Arc<ServiceSharedState>>,
|
||||
Extension(settings): Extension<QuerySettings>,
|
||||
user_agent_header: Option<TypedHeader<headers::UserAgent>>,
|
||||
SecureClientIp(client_ip): SecureClientIp
|
||||
ClientIp(client_ip): ClientIp
|
||||
) -> Response {
|
||||
|
||||
let state = Arc::clone(&arc_state);
|
||||
@@ -589,7 +589,7 @@ async fn handle_ip_route_with_path(
|
||||
Extension(settings): Extension<QuerySettings>,
|
||||
State(arc_state): State<Arc<ServiceSharedState>>,
|
||||
extract::Path(query): extract::Path<String>,
|
||||
SecureClientIp(client_ip): SecureClientIp
|
||||
ClientIp(client_ip): ClientIp
|
||||
) -> Response {
|
||||
if let Ok(address) = query.parse() {
|
||||
return handle_ip_request(address, settings, arc_state, &client_ip).await
|
||||
|
||||
Reference in New Issue
Block a user