Skip to content

Commit

Permalink
feat(dump): Adding RemoteAddr and Host
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Jan 20, 2022
1 parent 5b56ba0 commit 3e1eb44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ func dumpRequest(r *http.Request) (string, error) {
}

var outputPattern bytes.Buffer
outputPattern.WriteString("%s %s")
outputPattern.WriteString("RemoteAddr=`%s`\nHost=`%s`\n%s %s")
outputData := []interface{}{
r.RemoteAddr,
r.Host,
r.Method,
r.URL.Path,
}
Expand Down

0 comments on commit 3e1eb44

Please sign in to comment.