Compare commits

...
3 changed files with 15 additions and 10 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
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`.
+4 -3
View File
@@ -412,7 +412,7 @@
# env: CONTINUWUITY_IP_LOOKUP_STRATEGY # env: CONTINUWUITY_IP_LOOKUP_STRATEGY
#ip_lookup_strategy = 5 #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: # Takes any of the following options:
# #
@@ -431,9 +431,10 @@
# to set this header" check; if the header selected is present, it is # to set this header" check; if the header selected is present, it is
# used. # 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. # as a fallback if the chosen header is not found.
# #
# env: CONTINUWUITY_REQUEST_IP_SOURCE # env: CONTINUWUITY_REQUEST_IP_SOURCE
+10 -7
View File
@@ -195,7 +195,7 @@ pub struct Config {
/// announcements or major updates. This is not an update check endpoint. /// announcements or major updates. This is not an update check endpoint.
/// ///
/// default: true /// default: true
#[serde(alias = "allow_check_for_updates", default = "true_fn")] #[serde(default = "true_fn")]
pub allow_announcements_check: bool, pub allow_announcements_check: bool,
/// Set this to any float value to multiply continuwuity's in-memory LRU /// Set this to any float value to multiply continuwuity's in-memory LRU
@@ -490,7 +490,7 @@ pub struct Config {
#[serde(default = "default_ip_lookup_strategy")] #[serde(default = "default_ip_lookup_strategy")]
pub ip_lookup_strategy: u8, 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: /// 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 /// to set this header" check; if the header selected is present, it is
/// used. /// 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. /// as a fallback if the chosen header is not found.
#[serde(default)] #[serde(default)]
pub request_ip_source: Option<String>, pub request_ip_source: Option<String>,
@@ -2993,11 +2994,16 @@ impl<'de, K: Hash + Eq + Clone> Deserialize<'de> for PerMinuteRatelimiter<K> {
} }
const DEPRECATED_KEYS: &[&str] = &[ const DEPRECATED_KEYS: &[&str] = &[
"allow_check_for_updates",
"allow_moderators_to_view_redacted_content",
"allow_sticky_events",
"cache_capacity", "cache_capacity",
"conduit_cache_capacity_modifier", "conduit_cache_capacity_modifier",
"max_concurrent_requests", "max_concurrent_requests",
"otlp_protocol", "otlp_protocol",
"request_ip_source",
"roomid_spacehierarchy_cache_capacity", "roomid_spacehierarchy_cache_capacity",
"unredacted_content_max_age_secs",
"well_known_client", "well_known_client",
"well_known_server", "well_known_server",
"well_known_support_page", "well_known_support_page",
@@ -3005,9 +3011,6 @@ const DEPRECATED_KEYS: &[&str] = &[
"well_known_support_email", "well_known_support_email",
"well_known_support_mxid", "well_known_support_mxid",
"well_known.rtc_focus_server_urls", "well_known.rtc_focus_server_urls",
"allow_sticky_events",
"allow_moderators_to_view_redacted_content",
"unredacted_content_max_age_secs",
]; ];
impl Config { impl Config {