mirror of https://github.com/minio/minio.git
fix: missing path in admin trace (#12373)
PR #12360 introduced a change which seems to have added a regression, the RawPath in r.URL seems to be empty, if it is fallback to r.URL.Path instead.
This commit is contained in:
parent
7b06b754a6
commit
225d8c51fd
|
@ -218,12 +218,17 @@ func Trace(f http.HandlerFunc, logBody bool, w http.ResponseWriter, r *http.Requ
|
|||
Time: now,
|
||||
Proto: r.Proto,
|
||||
Method: r.Method,
|
||||
Path: r.URL.RawPath,
|
||||
RawQuery: redactLDAPPwd(r.URL.RawQuery),
|
||||
Client: handlers.GetSourceIP(r),
|
||||
Headers: reqHeaders,
|
||||
}
|
||||
|
||||
path := r.URL.RawPath
|
||||
if path == "" {
|
||||
path = r.URL.Path
|
||||
}
|
||||
rq.Path = path
|
||||
|
||||
rw := logger.NewResponseWriter(w)
|
||||
rw.LogErrBody = true
|
||||
rw.LogAllBody = logBody
|
||||
|
|
Loading…
Reference in New Issue