mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
remove auditing for /ui/
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 = ["*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user