File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments