mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
Merge 0b47962017 into 12eabbd76d
This commit is contained in:
commit
24c781fb75
1 changed files with 1 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ func (handler *jwtHandler) ServeHTTP(out http.ResponseWriter, r *http.Request) {
|
|||
strToken string
|
||||
claims jwt.RegisteredClaims
|
||||
)
|
||||
if auth := r.Header.Get("Authorization"); strings.HasPrefix(auth, "Bearer ") {
|
||||
if auth := r.Header.Get("Authorization"); len(auth) >= 7 && strings.EqualFold(auth[:7], "bearer ") {
|
||||
strToken = strings.TrimPrefix(auth, "Bearer ")
|
||||
}
|
||||
if len(strToken) == 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue