Skip to content

Commit ae105b6

Browse files
author
yangben
committed
Fix the issue of get Authorization header fails during bearer auth
1 parent 58c5e72 commit ae105b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/server/auth/middleware/bearer_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(
3434
self.provider = provider
3535

3636
async def authenticate(self, conn: HTTPConnection):
37-
auth_header = conn.headers.get("Authorization")
37+
auth_header = conn.headers.get("Authorization") or conn.headers.get("authorization")
3838
if not auth_header or not auth_header.startswith("Bearer "):
3939
return None
4040

0 commit comments

Comments
 (0)