We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18a2cf6 commit 8e9c8a5Copy full SHA for 8e9c8a5
jwtmiddleware.go
@@ -236,8 +236,7 @@ func (m *JWTMiddleware) CheckJWT(next http.Handler) http.Handler {
236
237
// no err means we have a valid token, so set it into the
238
// context and continue onto next
239
- newRequest := r.WithContext(context.WithValue(r.Context(), ContextKey{}, validToken))
240
- r = newRequest
+ r = r.Clone(context.WithValue(r.Context(), ContextKey{}, validToken))
241
next.ServeHTTP(w, r)
242
})
243
}
0 commit comments