v0.37.1
This commit is contained in:
1 parent
78dbb31487
commit
f48843e934
83 files changed
+7304
-1203
No files matched your search
@@ -112,14 +112,22 @@ if handshake.as_ref().is_some_and(|handshake| {
|
||||
"RustProxy: HTTP/1.1 WebSocket upstream returned 2xx without switching protocols\n",
|
||||
);
|
||||
}
|
||||
let cache_rule_overrides = match (&cache_rule_context, cache_ticket.is_some()) {
|
||||
(Some(rule_context), true) => rule_context.response_overrides(response.status(), response.headers()),
|
||||
_ => crate::cache::ResponseOverrides::NONE,
|
||||
};
|
||||
if cache_rule_overrides.strip_set_cookie {
|
||||
response.headers_mut().remove(::http::header::SET_COOKIE);
|
||||
}
|
||||
let origin_plan = if cache_ticket.is_some()
|
||||
&& !(ignore_static_cookie && crate::cache::varies_on(response.headers(), "cookie"))
|
||||
{
|
||||
crate::cache::plan(
|
||||
crate::cache::plan_with(
|
||||
response.status(),
|
||||
response.headers(),
|
||||
cache_settings,
|
||||
upstream_started.elapsed(),
|
||||
&cache_rule_overrides,
|
||||
).map(|plan| {
|
||||
let plan = if force_vary_cookie { plan.with_vary("cookie") } else { plan };
|
||||
if force_vary_authorization { plan.with_vary("authorization") } else { plan }
|
||||
@@ -392,5 +400,5 @@ if !range_requested && handshake.is_none() {
|
||||
};
|
||||
}
|
||||
}
|
||||
(origin_validation_headers, origin_plan, origin_reason, response)
|
||||
(origin_validation_headers, origin_plan, origin_reason, response, cache_rule_overrides)
|
||||
}
|
||||
Reference in new issue
Block a user