From e000fc89321cd77e426650e4baa485d0cb320581 Mon Sep 17 00:00:00 2001 From: Drew Bailey <2614075+drewbailey@users.noreply.github.com> Date: Fri, 27 Mar 2020 10:12:42 -0400 Subject: [PATCH] remove auditing for /ui/ --- command/agent/http.go | 4 ++-- website/pages/docs/configuration/audit.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/agent/http.go b/command/agent/http.go index bda062315..81e60f9c4 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -387,12 +387,12 @@ func (e *codedError) Code() int { } func (s *HTTPServer) handleUI(h http.Handler) http.Handler { - return s.auditHTTPHandler(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { header := w.Header() header.Add("Content-Security-Policy", "default-src 'none'; connect-src *; img-src 'self' data:; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'none'; frame-ancestors 'none'") h.ServeHTTP(w, req) return - })) + }) } func (s *HTTPServer) handleRootFallthrough() http.Handler { diff --git a/website/pages/docs/configuration/audit.mdx b/website/pages/docs/configuration/audit.mdx index c5551fc17..f0a36617b 100644 --- a/website/pages/docs/configuration/audit.mdx +++ b/website/pages/docs/configuration/audit.mdx @@ -121,10 +121,10 @@ logging as well as reducing the amount of events generated. `endpoints`, `stages`, and `operations` support [globbed pattern](https://github.com/ryanuber/go-glob/blob/master/README.md#example) matching. ```hcl -# Filter all requests and all stages for /ui/ and /v1/agent/health +# Filter all requests and all stages for /v1/agent/health filter "default" { type = "HTTPEvent" - endpoints = ["/ui/", "/v1/agent/health"] + endpoints = ["/v1/agent/health"] stages = ["*"] operations = ["*"] }