fix: Add Accept header to auth metadata request (#901)
This commit is contained in:
parent
c84ef24215
commit
8f4150e5a0
2 changed files with 6 additions and 2 deletions
|
|
@ -863,7 +863,8 @@ describe('OAuth Authorization', () => {
|
|||
const calls = mockFetch.mock.calls;
|
||||
const [, options] = calls[0];
|
||||
expect(options.headers).toEqual({
|
||||
'MCP-Protocol-Version': '2025-01-01'
|
||||
'MCP-Protocol-Version': '2025-01-01',
|
||||
Accept: 'application/json'
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -738,7 +738,10 @@ export async function discoverAuthorizationServerMetadata(
|
|||
protocolVersion?: string;
|
||||
} = {}
|
||||
): Promise<AuthorizationServerMetadata | undefined> {
|
||||
const headers = { 'MCP-Protocol-Version': protocolVersion };
|
||||
const headers = {
|
||||
'MCP-Protocol-Version': protocolVersion,
|
||||
Accept: 'application/json'
|
||||
};
|
||||
|
||||
// Get the list of URLs to try
|
||||
const urlsToTry = buildDiscoveryUrls(authorizationServerUrl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue