mirror of
https://github.com/minio/minio.git
synced 2025-04-08 13:45:37 -04:00
Honor standard HTTP headers for sourceIP (#8233)
Behind load balancers we should be tracing sourceIP preserved by load balancers.
This commit is contained in:
parent
6ba323b009
commit
ff6aabd9c0
@ -30,6 +30,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/minio/minio/cmd/logger"
|
"github.com/minio/minio/cmd/logger"
|
||||||
|
"github.com/minio/minio/pkg/handlers"
|
||||||
trace "github.com/minio/minio/pkg/trace"
|
trace "github.com/minio/minio/pkg/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -200,7 +201,7 @@ func Trace(f http.HandlerFunc, logBody bool, w http.ResponseWriter, r *http.Requ
|
|||||||
Method: r.Method,
|
Method: r.Method,
|
||||||
Path: r.URL.Path,
|
Path: r.URL.Path,
|
||||||
RawQuery: r.URL.RawQuery,
|
RawQuery: r.URL.RawQuery,
|
||||||
Client: r.RemoteAddr,
|
Client: handlers.GetSourceIP(r),
|
||||||
Headers: reqHeaders,
|
Headers: reqHeaders,
|
||||||
Body: reqBodyRecorder.Data(),
|
Body: reqBodyRecorder.Data(),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user