File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/vs/workbench/contrib/mcp/common Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -104,12 +104,12 @@ export function mcpServerToSourceData(server: IMcpServer): ToolDataSource {
104104 */
105105export function ValidateHttpResources ( resource : URI , server : IMcpServer | undefined ) {
106106 let isResourceRequestValid = false ;
107- if ( resource . path . indexOf ( '/http/' ) === 0 ) {
107+ if ( resource . path . startsWith ( '/http/' ) ) {
108108 const launch = server ?. connection . get ( ) ?. launchDefinition ;
109109 if ( launch && launch . type === McpServerTransportType . HTTP && launch . uri . authority . toLowerCase ( ) === resource . authority . toLowerCase ( ) ) {
110110 isResourceRequestValid = true ;
111111 }
112- } else if ( resource . path . indexOf ( '/https/' ) === 0 ) {
112+ } else if ( resource . path . startsWith ( '/https/' ) ) {
113113 isResourceRequestValid = true ;
114114 }
115115 return isResourceRequestValid ;
You can’t perform that action at this time.
0 commit comments