v0.34.0_6
This commit is contained in:
1 parent
5910e6e901
commit
47ce1f18c2
18 files changed
+364
-69
No files matched your search
@@ -40,7 +40,7 @@ if let Some(ticket) = &cache_ticket {
|
||||
cache_settings: cache_settings.clone(),
|
||||
transform: transform_settings.cloned(),
|
||||
uri: uri.clone(),
|
||||
public_suffix: public_suffix.clone(),
|
||||
public_suffix: public_suffix.to_string(),
|
||||
host: host.clone(),
|
||||
path: path.as_ref().to_owned(),
|
||||
scope: scope.to_owned(),
|
||||
@@ -77,7 +77,7 @@ if let Some(ticket) = &cache_ticket {
|
||||
cache_settings: cache_settings.clone(),
|
||||
transform: transform_settings.cloned(),
|
||||
uri: uri.clone(),
|
||||
public_suffix: public_suffix.clone(),
|
||||
public_suffix: public_suffix.to_string(),
|
||||
host: host.clone(),
|
||||
path: path.as_ref().to_owned(),
|
||||
scope: scope.to_owned(),
|
||||
@@ -238,7 +238,7 @@ if handshake.is_none()
|
||||
cache_settings: cache_settings.clone(),
|
||||
transform: transform_settings.cloned(),
|
||||
uri: uri.clone(),
|
||||
public_suffix: public_suffix.clone(),
|
||||
public_suffix: public_suffix.to_string(),
|
||||
host: host.clone(),
|
||||
path: path.as_ref().to_owned(),
|
||||
scope: scope.to_owned(),
|
||||
|
||||
@@ -169,12 +169,11 @@ let body_empty = if cache_enabled
|
||||
} else {
|
||||
cache_enabled && request.body().is_end_stream()
|
||||
};
|
||||
let public_suffix = request
|
||||
.uri()
|
||||
.path_and_query()
|
||||
.map(|v| v.as_str())
|
||||
.unwrap_or("/")
|
||||
.to_owned();
|
||||
// Keep the original URI alive through forwarding: ordinary targets can be
|
||||
// borrowed while route rewrites still allocate and are strictly validated.
|
||||
let public_suffix: std::borrow::Cow<'_, str> = std::borrow::Cow::Borrowed(
|
||||
routing_uri.path_and_query().map(|v| v.as_str()).unwrap_or("/")
|
||||
);
|
||||
let cache_plan = cache_plan::CachePlan::new(policy_reason, cache_settings, &path, || {
|
||||
cache_settings.active_for(route.cache) && route
|
||||
.frontend
|
||||
@@ -200,7 +199,7 @@ let origin_suffix = match route.rewritten_path(&path) {
|
||||
encoded.push('?');
|
||||
encoded.push_str(query);
|
||||
}
|
||||
encoded
|
||||
std::borrow::Cow::Owned(encoded)
|
||||
}
|
||||
Err(_) => return error(StatusCode::BAD_REQUEST, "RustProxy: invalid rewritten request target\n"),
|
||||
};
|
||||
|
||||
@@ -168,7 +168,7 @@ if let (Some(ticket), Some(plan), Some(transformed)) =
|
||||
cache_settings: cache_settings.clone(),
|
||||
transform: transform_settings.cloned(),
|
||||
uri: active_uri.clone(),
|
||||
public_suffix: public_suffix.clone(),
|
||||
public_suffix: public_suffix.to_string(),
|
||||
host: host.clone(),
|
||||
path: path.as_ref().to_owned(),
|
||||
scope: scope.to_owned(),
|
||||
|
||||
@@ -92,7 +92,7 @@ let retry_host_follows_backend = replay_headers.as_ref()
|
||||
.and_then(|headers| headers.get(HOST))
|
||||
.is_some_and(|value| value == expected_backend_host);
|
||||
let Some(upstream_target) = upstream_request_target(
|
||||
&uri, request.headers_mut(), &backend,
|
||||
uri, request.headers_mut(), &backend,
|
||||
websocket_legacy_support && !websocket_upstream_h2, websocket_upstream_h2,
|
||||
) else {
|
||||
return error(StatusCode::BAD_GATEWAY, "RustProxy: invalid upstream authority\n");
|
||||
|
||||
Reference in new issue
Block a user