mcp-server
mcp-server copied to clipboard
fix: reject conflicting auth sources instead of silently preferring ?token=
Fixes #27
Problem
When both header and query parameter are provided, silently replaces the header with the query token. This hides client misconfiguration and makes debugging auth problems harder.
Fix
Reject the request with when both auth sources are present, returning a clear error message. This makes the conflict visible immediately rather than silently choosing one.
Behavior:
- alone → works as before (lifted to header)
- header alone → works as before
- Both present → with descriptive message