Additionally allow "bearer" instead of only "Bearer" in Authorization… (#1558)

This commit is contained in:
Wolfgang Walther
2020-07-16 12:09:40 -05:00
committed by GitHub
parent 1f6a824dfb
commit 6b2767d35c
4 changed files with 16 additions and 4 deletions
+1
View File
@@ -263,6 +263,7 @@ userApiRequest confSchemas rootSpec req reqBody
auth = fromMaybe "" $ lookupHeader hAuthorization
tokenStr = case T.split (== ' ') (toS auth) of
("Bearer" : t : _) -> t
("bearer" : t : _) -> t
_ -> ""
endingIn:: [Text] -> Text -> Bool
endingIn xx key = lastWord `elem` xx