Fix key retrieval in context.go

This commit is contained in:
Kasidej 2026-01-05 10:42:58 +07:00 committed by GitHub
parent c08ca6ebb3
commit 2ef64e8946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1436,7 +1436,7 @@ func (c *Context) Value(key any) any {
if key == ContextKey {
return c
}
if val, exists := c.Get(keyAsString); exists {
if val, exists := c.Get(key); exists {
return val
}
if !c.hasRequestContext() {