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:
parent
efcc9d51d4
commit
2af8589afd
3 changed files with 41 additions and 22 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue