From 1c2b10303aab6961bc005dbf41df81209f839335 Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 23 Oct 2024 17:52:40 -0700 Subject: [PATCH] remove X-Forwarded-For fix https://github.com/seaweedfs/seaweedfs/issues/6136 --- weed/s3api/auth_signature_v4.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/weed/s3api/auth_signature_v4.go b/weed/s3api/auth_signature_v4.go index c37aa1289..9cc3e2766 100644 --- a/weed/s3api/auth_signature_v4.go +++ b/weed/s3api/auth_signature_v4.go @@ -687,8 +687,6 @@ func extractSignedHeaders(signedHeaders []string, r *http.Request) (http.Header, // Go http server removes "host" from Request.Header if forwardedHost := r.Header.Get("X-Forwarded-Host"); forwardedHost != "" { extractedSignedHeaders.Set(header, forwardedHost) - } else if forwardedFor := r.Header.Get("X-Forwarded-For"); forwardedFor != "" { - extractedSignedHeaders.Set(header, forwardedFor) } else { extractedSignedHeaders.Set(header, r.Host) }