This commit is contained in:
Mateusz Gruszczyński committed 2026-10-08 22:22:46 +02:00
1 parent 76cb4acef0
commit 68678e98be
84 files changed
+1519 -325

No files matched your search

+7 -3
View File
@@ -76,6 +76,7 @@ impl Snapshot {
}
None
}
pub fn frontend(
&self,
host: &str,
@@ -224,7 +225,8 @@ where
F: Fn(&CompiledRoute) -> bool,
{
if let Some(exact) = routes.iter().find(|route| {
allowed(route)
!route.internal
&& allowed(route)
&& route.match_type == crate::vhost::PathMatch::Exact
&& route.path_prefix == path
}) {
@@ -233,7 +235,8 @@ where
let prefix = routes
.iter()
.filter(|route| {
allowed(route)
!route.internal
&& allowed(route)
&& matches!(
route.match_type,
crate::vhost::PathMatch::Prefix | crate::vhost::PathMatch::PrefixPriority
@@ -245,7 +248,8 @@ where
return prefix;
}
if let Some(regex) = routes.iter().find(|route| {
allowed(route)
!route.internal
&& allowed(route)
&& matches!(
route.match_type,
crate::vhost::PathMatch::Regex | crate::vhost::PathMatch::RegexInsensitive