Skip to content

Commit

Permalink
Update hmiddleware/dynoid/dynoid.go
Browse files Browse the repository at this point in the history
Co-authored-by: Troels Thomsen <19824+tt@users.noreply.github.com>
  • Loading branch information
kennyp and tt committed Mar 14, 2024
1 parent 861fe5d commit 98d0de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hmiddleware/dynoid/dynoid.go
Expand Up @@ -107,7 +107,7 @@ func populateDynoID(audience string, callback dynoid.IssuerCallback) func(*http.

func tokenFromHeader(r *http.Request) string {
bearer := r.Header.Get("Authorization")
if len(bearer) > 7 && strings.ToUpper(bearer[0:6]) == "BEARER" {
if len(bearer) > 7 && bearer[:7] == "Bearer " {
return bearer[7:]
}
return ""
Expand Down

0 comments on commit 98d0de8

Please sign in to comment.