This commit is contained in:
Mateusz Gruszczyński committed 2026-11-10 00:15:50 +01:00
1 parent 2789991452
commit e260612ef9
60 files changed
+69 -339

No files matched your search

-5
View File
@@ -139,8 +139,6 @@ async fn forward_request(
}
let websocket_legacy_support =
handshake.is_some() && frontend.is_some_and(|frontend| frontend.websocket_legacy_support);
// The most specific host name wins: an exact vhost such as autodiscover.example.com must not be
// shadowed by a wildcard redirect or 404 host (*.example.com) that happens to be evaluated first.
let frontend_rank = frontend.and_then(|_| snapshot.frontend_rank(&host, local.0, tls));
let redirect = snapshot
.redirect_on(&host, &path, local.0, tls)
@@ -205,7 +203,6 @@ async fn forward_request(
{
return response;
}
// Redirects are evaluated after global and per-vhost country/IP/rate checks below.
}
let mut context = match snapshot.forwarding.context_with_peer(
request.headers(),
@@ -264,7 +261,6 @@ async fn forward_request(
}
}
}
// Global rules are cumulative: an explicit IP allow cannot bypass a country deny/allowlist.
if !snapshot
.global_security
.country_access
@@ -369,7 +365,6 @@ async fn forward_request(
"RustProxy: denied by access policy\n",
);
}
// Canonical / HTTPS redirects must not bypass global or per-vhost access policy.
if !cache_http_invalidation_method(request.method()) {
if let Some(mut response) = frontend.and_then(|frontend| {
canonical_host_redirect(frontend, &host, tls, local.0.port(), request.uri())
-1
View File
@@ -17,7 +17,6 @@ mod http2_tests {
request
}
#[test]
fn rfc8441_extended_connect_is_recognized() {
let request = extended_connect("websocket");
-1
View File
@@ -3,7 +3,6 @@ mod http3_tests {
use http::{Method, Request, Version};
use super::{h3_protocol, validate_h3};
#[test]
fn rfc9220_extended_connect_is_recognized() {
let mut request = Request::builder()