Skip to content

Commit a0fce2a

Browse files
Merge branch 'main' into bugfix/tool-validation-not-jsonrpc-error
2 parents 8705e69 + e74a358 commit a0fce2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server/auth/handlers/metadata.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Metadata Handler', () => {
2929
const response = await supertest(app).post('/.well-known/oauth-authorization-server').send({});
3030

3131
expect(response.status).toBe(405);
32-
expect(response.headers.allow).toBe('GET');
32+
expect(response.headers.allow).toBe('GET, OPTIONS');
3333
expect(response.body).toEqual({
3434
error: 'method_not_allowed',
3535
error_description: 'The method POST is not allowed for this endpoint'

src/server/auth/handlers/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function metadataHandler(metadata: OAuthMetadata | OAuthProtectedResource
1010
// Configure CORS to allow any origin, to make accessible to web-based MCP clients
1111
router.use(cors());
1212

13-
router.use(allowedMethods(['GET']));
13+
router.use(allowedMethods(['GET', 'OPTIONS']));
1414
router.get('/', (req, res) => {
1515
res.status(200).json(metadata);
1616
});

0 commit comments

Comments
 (0)