v0.35.0
This commit is contained in:
1 parent
2c03fcf248
commit
d3b492874b
95 files changed
+1628
-743
No files matched your search
+2
-6
@@ -273,17 +273,13 @@ impl Default for LocationResponse {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(tag = "type", rename_all = "snake_case")]
|
||||
pub enum Source {
|
||||
#[default]
|
||||
ReverseProxy,
|
||||
WebServer { web_service_id: String },
|
||||
}
|
||||
impl Default for Source {
|
||||
fn default() -> Self {
|
||||
Self::ReverseProxy
|
||||
}
|
||||
}
|
||||
impl Source {
|
||||
pub fn is_reverse_proxy(&self) -> bool {
|
||||
matches!(self, Self::ReverseProxy)
|
||||
|
||||
+7
-5
@@ -21,11 +21,13 @@ mod default_listener_tests {
|
||||
}
|
||||
#[test]
|
||||
fn listener_plan_inherits_legacy_h2_limits_and_prefers_listener_override() {
|
||||
let mut config = Config::default();
|
||||
config.http2 = crate::settings::Http2Connections {
|
||||
idle_timeout_seconds: 111,
|
||||
max_connection_lifetime_seconds: 222,
|
||||
drain_timeout_seconds: 33,
|
||||
let mut config = Config {
|
||||
http2: crate::settings::Http2Connections {
|
||||
idle_timeout_seconds: 111,
|
||||
max_connection_lifetime_seconds: 222,
|
||||
drain_timeout_seconds: 33,
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
config.listeners.endpoints = serde_json::from_value(json!([
|
||||
{
|
||||
|
||||
@@ -455,7 +455,7 @@ pub fn listener_plan(config: &Config, policy: &ValidationPolicy) -> Result<Vec<L
|
||||
.listeners
|
||||
.endpoints
|
||||
.iter()
|
||||
.filter(|e| e.enabled && e.bindings().into_iter().any(|value| same(value)))
|
||||
.filter(|e| e.enabled && e.bindings().into_iter().any(&same))
|
||||
{
|
||||
owners.push(format!("listener '{}' ({})", item.id, item.name));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user