1
0
Fork 0

Do not give responsewriter or its headers to asynchronous logging goroutine

Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
This commit is contained in:
mpl 2019-12-02 03:14:04 +01:00 committed by Traefiker Bot
parent efcc9d51d4
commit 2af8589afd
3 changed files with 41 additions and 22 deletions

View file

@ -116,7 +116,18 @@ type CoreLogData map[string]interface{}
// LogData is the data captured by the middleware so that it can be logged.
type LogData struct {
Core CoreLogData
Request http.Header
Request request
OriginResponse http.Header
DownstreamResponse http.Header
DownstreamResponse downstreamResponse
}
type downstreamResponse struct {
headers http.Header
status int
size int64
}
type request struct {
headers http.Header
count int64
}