4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-07 03:04:03 +00:00

Update vendor (#1560)

This commit is contained in:
Wim
2021-07-31 18:27:55 +02:00
committed by GitHub
parent 1f365c716e
commit 44f3e2557d
95 changed files with 1677 additions and 181 deletions

View File

@ -14,6 +14,9 @@ type (
// Generator defines a function to generate an ID.
// Optional. Default value random.String(32).
Generator func() string
// RequestIDHandler defines a function which is executed for a request id.
RequestIDHandler func(echo.Context, string)
}
)
@ -53,6 +56,9 @@ func RequestIDWithConfig(config RequestIDConfig) echo.MiddlewareFunc {
rid = config.Generator()
}
res.Header().Set(echo.HeaderXRequestID, rid)
if config.RequestIDHandler != nil {
config.RequestIDHandler(c, rid)
}
return next(c)
}