Skip to content

Commit 5772183

Browse files
Fix double slash in example server URLs
Remove trailing slash from baseUri before constructing example server URLs to avoid URLs like "example.com//budget-allocator/mcp". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b62d515 commit 5772183

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ async function main() {
239239
let html = fs.readFileSync(splashPath, 'utf8');
240240

241241
// Inject example server endpoints with copy buttons
242+
const baseUrl = config.baseUri.replace(/\/$/, ''); // Remove trailing slash if present
242243
const exampleServersHtml = AVAILABLE_EXAMPLES.map(slug => {
243-
const fullUrl = `${config.baseUri}/${slug}/mcp`;
244+
const fullUrl = `${baseUrl}/${slug}/mcp`;
244245
return `
245246
<div class="endpoint endpoint-with-copy">
246247
<div class="endpoint-info">

0 commit comments

Comments
 (0)