forked from marfrit/lmcp
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8748fe53bc | |||
| 3dd01e5313 | |||
| d2c2962ad1 |
@@ -939,7 +939,7 @@ local function _check_auth(self, conn)
|
|||||||
if not self._auth_token then return true end
|
if not self._auth_token then return true end
|
||||||
if conn.method == "OPTIONS" then return true end
|
if conn.method == "OPTIONS" then return true end
|
||||||
local auth = conn.headers["authorization"] or ""
|
local auth = conn.headers["authorization"] or ""
|
||||||
local token = auth:match("^Bearer%s+(.+)$")
|
local token = auth:match("^[Bb]earer%s+(.+)$")
|
||||||
return token == self._auth_token
|
return token == self._auth_token
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user