mirror of
https://github.com/minio/minio.git
synced 2025-02-03 09:55:59 -05:00
Avoid duplicate headers when proxying S3 listing requests (#10220)
This commit is contained in:
parent
6d64aab420
commit
9138b2b503
@ -480,6 +480,12 @@ func getHostName(r *http.Request) (hostName string) {
|
||||
func proxyRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, ep ProxyEndpoint) (success bool) {
|
||||
success = true
|
||||
|
||||
// Make sure we remove any existing headers before
|
||||
// proxying the request to another node.
|
||||
for k := range w.Header() {
|
||||
w.Header().Del(k)
|
||||
}
|
||||
|
||||
f := handlers.NewForwarder(&handlers.Forwarder{
|
||||
PassHost: true,
|
||||
RoundTripper: ep.Transport,
|
||||
|
Loading…
x
Reference in New Issue
Block a user