mirror of
https://github.com/minio/minio.git
synced 2025-04-21 02:54:24 -04:00
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,
|
Time: now,
|
||||||
Proto: r.Proto,
|
Proto: r.Proto,
|
||||||
Method: r.Method,
|
Method: r.Method,
|
||||||
Path: r.URL.RawPath,
|
|
||||||
RawQuery: redactLDAPPwd(r.URL.RawQuery),
|
RawQuery: redactLDAPPwd(r.URL.RawQuery),
|
||||||
Client: handlers.GetSourceIP(r),
|
Client: handlers.GetSourceIP(r),
|
||||||
Headers: reqHeaders,
|
Headers: reqHeaders,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path := r.URL.RawPath
|
||||||
|
if path == "" {
|
||||||
|
path = r.URL.Path
|
||||||
|
}
|
||||||
|
rq.Path = path
|
||||||
|
|
||||||
rw := logger.NewResponseWriter(w)
|
rw := logger.NewResponseWriter(w)
|
||||||
rw.LogErrBody = true
|
rw.LogErrBody = true
|
||||||
rw.LogAllBody = logBody
|
rw.LogAllBody = logBody
|
||||||
|
Loading…
x
Reference in New Issue
Block a user