File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ const sanitize = (path: string) => {
7474} ;
7575
7676const isListToolsRequest = async ( c : Context < AppEnv > ) => {
77- const clonedReq = c . req . raw . clone ( ) ;
7877 try {
78+ const clonedReq = c . req . raw . clone ( ) ;
7979 const body = ( await clonedReq . json ( ) ) as { method ?: string } ;
8080 // Allow tools/list to pass without auth
8181 return body ?. method === "tools/list" ;
@@ -358,7 +358,7 @@ export const withOAuth = ({
358358 const url = new URL ( c . req . url ) ;
359359 const ctx = honoCtxToAppCtx ( c ) ;
360360
361- if ( ! ctx . user && ! isListToolsRequest ( c ) ) {
361+ if ( ! ctx . user && ! ( await isListToolsRequest ( c ) ) ) {
362362 // Get OAuth params using the provided function
363363 const params = await getOAuthParams ( c ) ;
364364 // Build resource metadata URL using the MCP URL builder (no query params)
You can’t perform that action at this time.
0 commit comments