Skip to content

Commit

Permalink
Update requestid.go (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
someone-stole-my-name authored Feb 4, 2022
1 parent 59de2c7 commit 7ae23f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions requestid.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func New(config ...Config) gin.HandlerFunc {
rid := c.GetHeader(headerXRequestID)
if rid == "" {
rid = cfg.Generator()
// Set the id to ensure that the requestid is in the request
c.Request.Header.Add(headerXRequestID, rid)
}

// Set the id to ensure that the requestid is in the response
Expand Down

0 comments on commit 7ae23f4

Please sign in to comment.