A fork of https://github.com/teal-fm/piper

fix: listenbrainz-compatible api not working with clients that send "Token" instead of "Bearer"

Signed-off-by: rooot <hey@rooot.gay>

Changed files
+1 -1
db
apikey
+1 -1
db/apikey/apikey.go
··· 179 179 authHeader := r.Header.Get("Authorization") 180 180 if authHeader != "" { 181 181 parts := strings.SplitN(authHeader, " ", 2) 182 - if len(parts) == 2 && strings.ToLower(parts[0]) == "bearer" { 182 + if len(parts) == 2 && (strings.ToLower(parts[0]) == "bearer" || strings.ToLower(parts[0]) == "token") { 183 183 return parts[1], nil 184 184 } 185 185 }