v0.34.0_2

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-17 23:37:43 +02:00
1 parent 0a8bc6f040
commit 434e789144
38 files changed
+899 -238

No files matched your search

+7 -1
View File
@@ -152,7 +152,13 @@ fn retry_safe_method(method: &Method) -> bool {
}
fn upstream_uri(backend: &crate::config::CompiledBackend, suffix: &str) -> Option<Uri> {
format!("{}{suffix}", backend.request_origin).parse().ok()
// Reuse the validated scheme and authority from the immutable compiled
// backend. Only the untrusted path/query is parsed per request. This also
// prevents accidental authority changes from rewritten paths.
let path: http::uri::PathAndQuery = suffix.parse().ok()?;
let mut parts = backend.request_origin_uri.clone().into_parts();
parts.path_and_query = Some(path);
Uri::from_parts(parts).ok()
}
fn legacy_websocket_origin(