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
+7
-2
@@ -72,7 +72,11 @@ pub struct Config {
|
||||
pub host_policies: Vec<HostPolicy>,
|
||||
// Preserve old 0.34.13 and earlier config/backup data until compilation migrates it.
|
||||
// Migration happens in compile_with_active, before validation and persistence.
|
||||
#[serde(default, rename = "user_agent_blocking", skip_serializing_if = "Option::is_none")]
|
||||
#[serde(
|
||||
default,
|
||||
rename = "user_agent_blocking",
|
||||
skip_serializing_if = "Option::is_none"
|
||||
)]
|
||||
pub legacy_user_agent_blocking: Option<crate::user_agent::Policy>,
|
||||
#[serde(default)]
|
||||
pub global_security: GlobalSecurity,
|
||||
@@ -124,7 +128,8 @@ impl Config {
|
||||
|
||||
impl GlobalSecurity {
|
||||
pub fn compile(&mut self) -> Result<CompiledGlobalSecurity> {
|
||||
let user_agent_blocking = self.user_agent_blocking
|
||||
let user_agent_blocking = self
|
||||
.user_agent_blocking
|
||||
.get_or_insert_with(Default::default)
|
||||
.compile()?;
|
||||
self.country_access.validate()?;
|
||||
|
||||
Reference in new issue
Block a user