Browse Source

support load balancer in front of s3

pull/6090/head
chrislu 3 months ago
parent
commit
f747767aa1
  1. 4
      weed/s3api/auth_signature_v4.go

4
weed/s3api/auth_signature_v4.go

@ -664,7 +664,11 @@ func extractSignedHeaders(signedHeaders []string, r *http.Request) (http.Header,
extractedSignedHeaders.Set(header, "100-continue")
case "host":
// Go http server removes "host" from Request.Header
if forwardedFor := r.Header.Get("X-Forwarded-For"); forwardedFor != "" {
extractedSignedHeaders.Set(header, forwardedFor)
} else {
extractedSignedHeaders.Set(header, r.Host)
}
case "transfer-encoding":
for _, enc := range r.TransferEncoding {
extractedSignedHeaders.Add(header, enc)

Loading…
Cancel
Save