diff --git a/core/middleware/operation.go b/core/middleware/operation.go index 16edab468..7fcae5dc4 100644 --- a/core/middleware/operation.go +++ b/core/middleware/operation.go @@ -106,7 +106,7 @@ func OperationLog() gin.HandlerFunc { writer := responseBodyWriter{ ResponseWriter: c.Writer, body: &bytes.Buffer{}, - captureBody: shouldCaptureResponseBody(c.Request.URL.Path), + captureBody: !strings.Contains(strings.ToLower(c.Request.URL.Path), "download"), } c.Writer = &writer now := time.Now() @@ -272,16 +272,8 @@ func (r *responseBodyWriter) Write(b []byte) (int, error) { return r.ResponseWriter.Write(b) } -func shouldCaptureResponseBody(reqPath string) bool { - reqPath = strings.ToLower(reqPath) - if strings.Contains(reqPath, "download") { - return false - } - return true -} - func loadLogInfo(path string) string { - path = replaceStr(path, "/api/v2", "/core", "/xpack") + path = replaceStr(path, "/api/v2", "/core", "/xpack", "/enterprise") if !strings.Contains(path, "/") { return "" } diff --git a/frontend/src/components/router-button/index.vue b/frontend/src/components/router-button/index.vue index c4e7f9942..e08011b94 100644 --- a/frontend/src/components/router-button/index.vue +++ b/frontend/src/components/router-button/index.vue @@ -1,25 +1,44 @@