v0.38.10
This commit is contained in:
1 parent
38a23e2210
commit
45b1fc04c7
36 files changed
+9594
-7892
No files matched your search
@@ -112,12 +112,24 @@ 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 cache_rule_overrides = cache_rule_context
|
||||
.as_ref()
|
||||
.map(|rules| rules.response_overrides(response.status(), response.headers()))
|
||||
.unwrap_or(crate::cache::ResponseOverrides::NONE);
|
||||
// VCL backend-response mutations affect both the cache plan and the actual
|
||||
// response, including requests that bypass storage.
|
||||
cache_rule_overrides.apply_headers(response.headers_mut());
|
||||
// A shared intermediary downstream must also partition by the credentials
|
||||
// that RustProxy uses internally, not just RustProxy's HOT/COLD variants.
|
||||
for (needed, header) in [
|
||||
(force_vary_cookie, "cookie"),
|
||||
(force_vary_authorization, "authorization"),
|
||||
] {
|
||||
if needed && !crate::cache::varies_on(response.headers(), header) {
|
||||
if let Ok(value) = http::HeaderValue::from_str(header) {
|
||||
response.headers_mut().append(::http::header::VARY, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
let origin_status = response.status();
|
||||
crate::cache::normalize_static_cookie_vary(
|
||||
|
||||
Reference in new issue
Block a user