0.34.13_cleaup_code
This commit is contained in:
1 parent
ec46a96a29
commit
5c2e50ec06
87 files changed
+4890
-1338
No files matched your search
+15
-5
@@ -67,9 +67,12 @@ fn ensure_locked_listener(config: &mut crate::config::Config, address: SocketAdd
|
||||
return;
|
||||
}
|
||||
let canonical_id = if tls { "https" } else { "http" };
|
||||
if let Some(endpoint) = config.listeners.endpoints.iter_mut().find(|endpoint| {
|
||||
endpoint.id == canonical_id && endpoint.binding.tls == tls
|
||||
}) {
|
||||
if let Some(endpoint) = config
|
||||
.listeners
|
||||
.endpoints
|
||||
.iter_mut()
|
||||
.find(|endpoint| endpoint.id == canonical_id && endpoint.binding.tls == tls)
|
||||
{
|
||||
endpoint.binding.address = address;
|
||||
endpoint.additional_addresses.clear();
|
||||
endpoint.enabled = true;
|
||||
@@ -166,7 +169,13 @@ pub struct PanelCompression {
|
||||
pub gzip: bool,
|
||||
}
|
||||
impl Default for PanelCompression {
|
||||
fn default() -> Self { Self { zstd: true, br: true, gzip: true } }
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
zstd: true,
|
||||
br: true,
|
||||
gzip: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
@@ -248,7 +257,8 @@ impl Administration {
|
||||
*public_origin = normalize_public_admin_origin(public_origin)?;
|
||||
}
|
||||
if let Some(host) = self.public_origin_host().map(str::to_owned) {
|
||||
self.allowed_hosts.retain(|allowed| !allowed.eq_ignore_ascii_case(&host));
|
||||
self.allowed_hosts
|
||||
.retain(|allowed| !allowed.eq_ignore_ascii_case(&host));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user