generated from pkg/go-template
feat :
This commit is contained in:
+2
-1
@@ -65,7 +65,8 @@ func GetFibberRecoverConfig() recover.Config {
|
||||
|
||||
// FibberUserCtxWithTraceHandler 把fibberCtx的traceId 置入UserCtx中
|
||||
func FibberUserCtxWithTraceHandler(c *fiber.Ctx) error {
|
||||
c.SetUserContext(context.WithValue(context.Background(), fiber.HeaderXRequestID, c.Response().Header.Peek(fiber.HeaderXRequestID)))
|
||||
peek := c.Response().Header.Peek(fiber.HeaderXRequestID)
|
||||
c.SetUserContext(context.WithValue(context.Background(), fiber.HeaderXRequestID, string(peek)))
|
||||
return c.Next()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user