We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b65e1d3 commit f45826eCopy full SHA for f45826e
jwtauth.go
@@ -268,7 +268,7 @@ func TokenFromCookie(r *http.Request) string {
268
func TokenFromHeader(r *http.Request) string {
269
// Get token from authorization header.
270
bearer := r.Header.Get("Authorization")
271
- if len(bearer) > 7 && strings.ToUpper(bearer[0:6]) == "BEARER" {
+ if len(bearer) > 7 && strings.EqualFold(bearer[0:7], "Bearer ") {
272
return bearer[7:]
273
}
274
return ""
0 commit comments