fix: case-insensitive Bearer token parsing in auth header #25
Reference in New Issue
Block a user
Delete Branch "williams/lmcp:fix/case-insensitive-bearer-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The MCP auth header regex
^Bearerrejects lowercasebearertokens. Some HTTP clients sendauthorization: bearer <token>(lowercase scheme), causing spurious 401s even with a valid token.Fix
Changed regex from
^Bearerto^[Bb]earerto accept bothBearerandbearer.This was tested live on the hertz production server — all four header case combinations (
authorization/Authorization×Bearer/bearer) now return HTTP 200.Closes #21