🐛 [Bug]: requestId middleware still only accepts string
for ContextKey
config value, should be any
like c.Locals
.
#2356
Labels
string
for ContextKey
config value, should be any
like c.Locals
.
#2356
Bug Description
#2143 allows to use
any
as key forc.Locals(key, v)
. The RequestID middleware should be consistent with that.This allows to use a custom type for context keys, like for other keys. The RequestID is likely read back somewhere else along other context keys.
How to Reproduce
See https://docs.gofiber.io/api/middleware/requestid#config
Expected Behavior
https://docs.gofiber.io/api/middleware/requestid#config should have
ContextKey interface{}
Fiber Version
v2.42.0
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: