From bd26b2d59659387f7d2fde7e98cb3947554313cb Mon Sep 17 00:00:00 2001 From: Julian Anderson Date: Fri, 20 Nov 2026 10:27:03 -0500 Subject: [PATCH] chore(config): Deprecate request_ip_source --- changelog.d/2556.misc.md | 2 +- conduwuit-example.toml | 7 ++++--- src/core/config/mod.rs | 8 +++++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/changelog.d/2556.misc.md b/changelog.d/2556.misc.md index 6869942de..8840924f8 100644 --- a/changelog.d/2556.misc.md +++ b/changelog.d/2556.misc.md @@ -1 +1 @@ -The former configuration alias `allow_check_for_updates` is now explicitly deprecated in favor of `allow_announcements_check`. +The former configuration alias `allow_check_for_updates` is now explicitly deprecated in favor of `allow_announcements_check`. Additionally, `request_ip_source` is now deprecated in favor of `accepted_ip_sources`. diff --git a/conduwuit-example.toml b/conduwuit-example.toml index c5a3edce6..e860a971c 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -412,7 +412,7 @@ # env: CONTINUWUITY_IP_LOOKUP_STRATEGY #ip_lookup_strategy = 5 -# The preferred source to use for getting the real client IP. +# DEPRECATED: The preferred source to use for getting the real client IP. # # Takes any of the following options: # @@ -431,9 +431,10 @@ # to set this header" check; if the header selected is present, it is # used. # -# Ignored if `accepted_ip_sources` is set. +# Ignored if `accepted_ip_sources` is set. `accepted_ip_sources` is +# the preferred alternative. # -# If not set set, `direct` is used. Additionally, `direct` is used +# If not set, `direct` is used. Additionally, `direct` is used # as a fallback if the chosen header is not found. # # env: CONTINUWUITY_REQUEST_IP_SOURCE diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index 536193e10..56b0db526 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -490,7 +490,7 @@ pub struct Config { #[serde(default = "default_ip_lookup_strategy")] pub ip_lookup_strategy: u8, - /// The preferred source to use for getting the real client IP. + /// DEPRECATED: The preferred source to use for getting the real client IP. /// /// Takes any of the following options: /// @@ -509,9 +509,10 @@ pub struct Config { /// to set this header" check; if the header selected is present, it is /// used. /// - /// Ignored if `accepted_ip_sources` is set. + /// Ignored if `accepted_ip_sources` is set. `accepted_ip_sources` is + /// the preferred alternative. /// - /// If not set set, `direct` is used. Additionally, `direct` is used + /// If not set, `direct` is used. Additionally, `direct` is used /// as a fallback if the chosen header is not found. #[serde(default)] pub request_ip_source: Option, @@ -3000,6 +3001,7 @@ const DEPRECATED_KEYS: &[&str] = &[ "conduit_cache_capacity_modifier", "max_concurrent_requests", "otlp_protocol", + "request_ip_source", "roomid_spacehierarchy_cache_capacity", "unredacted_content_max_age_secs", "well_known_client",