Skip to content

Commit 7b7a733

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

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

3636
async def authenticate(self, conn: HTTPConnection):
37-
auth_header = conn.headers.get("Authorization") or conn.headers.get("authorization")
37+
auth_header = conn.headers.get("Authorization") or conn.headers.get(
38+
"authorization"
39+
)
3840
if not auth_header or not auth_header.startswith("Bearer "):
3941
return None
4042

0 commit comments

Comments
 (0)