Skip to content

Commit

Permalink
Merge pull request #381 from askuy/feature/httpheader
Browse files Browse the repository at this point in the history
set http custom header
  • Loading branch information
askuy authored May 10, 2024
2 parents 548d2b5 + c3ff766 commit b3225d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/ehttp/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func logAccess(name string, config *Config, logger *elog.Component, req *resty.R
for _, key := range loggerKeys {
if value := req.Context().Value(key); value != nil {
fields = append(fields, elog.FieldCustomKeyValue(key, cast.ToString(value)))
req.SetHeader(key, cast.ToString(value))
}
}

Expand Down

0 comments on commit b3225d8

Please sign in to comment.