forked from marfrit/lmcp
Merge pull request 'fix: case-insensitive Bearer token parsing in auth header' (#25) from williams/lmcp:fix/case-insensitive-bearer-auth into master
Reviewed-on: marfrit/lmcp#25
This commit is contained in:
@@ -939,7 +939,7 @@ local function _check_auth(self, conn)
|
||||
if not self._auth_token then return true end
|
||||
if conn.method == "OPTIONS" then return true end
|
||||
local auth = conn.headers["authorization"] or ""
|
||||
local token = auth:match("^Bearer%s+(.+)$")
|
||||
local token = auth:match("^[Bb]earer%s+(.+)$")
|
||||
return token == self._auth_token
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user