v0.31.5
This commit is contained in:
1 parent
d942c1a35d
commit
75104f87ba
103 files changed
+1344
-370
No files matched your search
@@ -223,6 +223,7 @@ pub fn compile_with_active(
|
||||
guarded_bindings.sort();
|
||||
guarded_bindings.dedup();
|
||||
let global_headers = config.headers.compile()?;
|
||||
let user_agent_blocking = config.user_agent_blocking.compile()?;
|
||||
ensure!(
|
||||
config.host_policies.len() <= 256,
|
||||
"too many host ACL policies"
|
||||
@@ -330,6 +331,7 @@ pub fn compile_with_active(
|
||||
redirects,
|
||||
not_found_hosts,
|
||||
host_acls,
|
||||
user_agent_blocking,
|
||||
headers: global_headers,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ pub struct Config {
|
||||
pub vhosts: Vec<crate::vhost::Vhost>,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub host_policies: Vec<HostPolicy>,
|
||||
#[serde(default)]
|
||||
pub user_agent_blocking: crate::user_agent::Policy,
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub acl_profiles: Vec<AclProfile>,
|
||||
#[serde(default, skip_serializing_if = "HeaderRules::is_empty")]
|
||||
@@ -263,6 +265,7 @@ pub struct CompiledFrontend {
|
||||
pub transform: crate::transform::Settings,
|
||||
pub pages: crate::pages::VhostPages,
|
||||
pub proxy_timeouts: crate::vhost::ProxyTimeouts,
|
||||
pub user_agent_blocking: crate::user_agent::CompiledPolicy,
|
||||
}
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ResolvedLogVhost {
|
||||
@@ -287,6 +290,7 @@ pub struct Snapshot {
|
||||
redirects: HashMap<String, Vec<Arc<crate::redirect::CompiledHost>>>,
|
||||
not_found_hosts: HashMap<String, Vec<Arc<crate::not_found::CompiledHost>>>,
|
||||
host_acls: HashMap<String, Arc<CompiledAcl>>,
|
||||
pub user_agent_blocking: crate::user_agent::CompiledPolicy,
|
||||
pub headers: CompiledHeaders,
|
||||
}
|
||||
impl std::fmt::Debug for Snapshot {
|
||||
|
||||
@@ -224,6 +224,7 @@ fn compile_routing(
|
||||
transform: host.transform.resolve(&config.transform)?,
|
||||
pages: host.pages.clone(),
|
||||
proxy_timeouts: host.proxy_timeouts.clone(),
|
||||
user_agent_blocking: host.user_agent_blocking.compile()?,
|
||||
});
|
||||
if host.enabled {
|
||||
let (fallback_source, fallback_pool, fallback_backend) = match &host.source {
|
||||
|
||||
Reference in new issue
Block a user