mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 15:29:12 +01:00
seaweed-volume: drop proxy-specific headers from replica proxy reads
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
51d068a98d
commit
6389887ebb
1 file changed
+8
@@ -962,6 +962,9 @@ async fn proxy_request(
|
||||
"te",
|
||||
"trailer",
|
||||
"upgrade",
|
||||
"proxy-connection",
|
||||
"proxy-authenticate",
|
||||
"proxy-authorization",
|
||||
] {
|
||||
hop_by_hop.insert(fixed.to_string());
|
||||
}
|
||||
@@ -5676,6 +5679,10 @@ mod tests {
|
||||
"x-hop-marker",
|
||||
header::HeaderValue::from_static("private"),
|
||||
);
|
||||
original_headers.insert(
|
||||
"proxy-authorization",
|
||||
header::HeaderValue::from_static("Basic cHJveHk6c2VjcmV0"),
|
||||
);
|
||||
let info = ProxyRequestInfo {
|
||||
method: Method::GET,
|
||||
original_headers,
|
||||
@@ -5700,6 +5707,7 @@ mod tests {
|
||||
"transfer-encoding",
|
||||
"connection",
|
||||
"x-hop-marker",
|
||||
"proxy-authorization",
|
||||
] {
|
||||
assert!(
|
||||
!headers.iter().any(|(n, _)| n == dropped),
|
||||
|
||||
Reference in new issue
Block a user