feat(requestid): put the request id to the response

This commit is contained in:
Muyao CHEN
2024-10-03 14:06:19 +02:00
parent ad1d4de7c3
commit 7886788c35
2 changed files with 4 additions and 1 deletions

View File

@ -23,5 +23,7 @@ func RequestID() gin.HandlerFunc {
rid = uuid.NewString()
ctx.Set(requestID, rid)
ctx.Writer.Header().Add(requestID, rid)
ctx.Next()
}
}