mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: sanitize values before being logged from request headers (#49245)
* Chore: sanitize values being logged directly from request headers
This commit is contained in:
committed by
GitHub
parent
51bc1bad1b
commit
dfab100dc7
@@ -24,6 +24,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
)
|
||||
|
||||
const _VERSION = "1.3.4.0805"
|
||||
@@ -156,6 +158,7 @@ func (m *Macaron) createContext(rw http.ResponseWriter, req *http.Request) *Cont
|
||||
index: 0,
|
||||
Router: m.Router,
|
||||
Resp: NewResponseWriter(req.Method, rw),
|
||||
logger: log.New("macaron.context"),
|
||||
}
|
||||
req = req.WithContext(context.WithValue(req.Context(), macaronContextKey{}, c))
|
||||
c.Map(c)
|
||||
|
||||
Reference in New Issue
Block a user