Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/app/src/server/mcp-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function parseGradioEndpoints(gradioParam: string): SpaceTool[] {
for (const entry of entries) {
// Validate exactly one slash
const slashCount = (entry.match(/\//g) || []).length;
if (slashCount !== 1) {
if (slashCount !== 1 && 'none' != entry) {
logger.warn(`Skipping invalid gradio entry "${entry}": must contain exactly one slash`);
continue;
}
Expand Down Expand Up @@ -152,6 +152,12 @@ export const createProxyServerFactory = (
return result;
}

// Skip Gradio endpoints if explicitly disabled
if (gradio === 'none') {
logger.debug('Gradio endpoints explicitly disabled via gradio="none"');
return result;
}

// Now we have access to userDetails if needed
if (userDetails) {
logger.debug(`Proxy has access to user details for: ${userDetails.name}`);
Expand Down