We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28029ba commit 01d65d1Copy full SHA for 01d65d1
packages/mcp-server/src/headers.ts
@@ -6,7 +6,7 @@ import { IncomingMessage } from 'node:http';
6
7
export const parseAuthHeaders = (req: IncomingMessage): Partial<ClientOptions> => {
8
if (req.headers.authorization) {
9
- const scheme = req.headers.authorization.slice(req.headers.authorization.search(' '));
+ const scheme = req.headers.authorization.split(' ')[0]!;
10
const value = req.headers.authorization.slice(scheme.length + 1);
11
switch (scheme) {
12
case 'Basic':
0 commit comments