Compare commits

..

1 commit

Author SHA1 Message Date
29916c0841 fix(deps): update rust crate axum-client-ip to v1
All checks were successful
/ check-renovaterc (push) Successful in 3s
/ build (push) Successful in 0s
/ test (push) Successful in 12s
/ report-size (push) Successful in 2s
| datasource | package        | from  | to    |
| ---------- | -------------- | ----- | ----- |
| crate      | axum-client-ip | 0.7.0 | 1.0.0 |
2025-04-02 19:43:49 +02:00
2 changed files with 7 additions and 7 deletions

View file

@ -4,7 +4,7 @@ use std::{
path::PathBuf,
};
use axum_client_ip::SecureClientIpSource;
use axum_client_ip::ClientIpSource;
use miette::{Context, IntoDiagnostic};
#[derive(Debug, Default, Clone, Copy, serde::Deserialize, serde::Serialize)]
@ -99,9 +99,9 @@ pub struct Records {
/// Set client IP source
///
/// see: <https://docs.rs/axum-client-ip/latest/axum_client_ip/enum.SecureClientIpSource.html>
/// see: <https://docs.rs/axum-client-ip/latest/axum_client_ip/enum.ClientIpSource.html>
#[serde(default = "default_ip_source")]
pub ip_source: SecureClientIpSource,
pub ip_source: ClientIpSource,
/// Set which IPs to allow updating (ipv4, ipv6 or both)
#[serde(default = "default_ip_type")]
@ -198,8 +198,8 @@ fn default_address() -> SocketAddr {
SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 5353)
}
fn default_ip_source() -> SecureClientIpSource {
SecureClientIpSource::RightmostXForwardedFor
fn default_ip_source() -> ClientIpSource {
ClientIpSource::RightmostXForwardedFor
}
fn default_ip_type() -> IpType {

View file

@ -10,7 +10,7 @@ use axum::{
routing::get,
Router,
};
use axum_client_ip::SecureClientIp;
use axum_client_ip::ClientIp;
use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use clap::{Parser, Subcommand};
use clap_verbosity_flag::Verbosity;
@ -456,7 +456,7 @@ impl FritzBoxUpdateParams {
#[tracing::instrument(skip(state), level = "trace", ret(level = "info"))]
async fn update_records(
State(state): State<AppState<'static>>,
SecureClientIp(ip): SecureClientIp,
ClientIp(ip): ClientIp,
Query(update_params): Query<FritzBoxUpdateParams>,
) -> axum::response::Result<&'static str> {
info!("accepted update from {ip}");