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>
This commit is contained in:
Jerome Swannack 2026-01-16 17:03:00 +00:00
commit 5772183ae8

View file

@ -239,8 +239,9 @@ async function main() {
let html = fs.readFileSync(splashPath, 'utf8'); let html = fs.readFileSync(splashPath, 'utf8');
// Inject example server endpoints with copy buttons // Inject example server endpoints with copy buttons
const baseUrl = config.baseUri.replace(/\/$/, ''); // Remove trailing slash if present
const exampleServersHtml = AVAILABLE_EXAMPLES.map(slug => { const exampleServersHtml = AVAILABLE_EXAMPLES.map(slug => {
const fullUrl = `${config.baseUri}/${slug}/mcp`; const fullUrl = `${baseUrl}/${slug}/mcp`;
return ` return `
<div class="endpoint endpoint-with-copy"> <div class="endpoint endpoint-with-copy">
<div class="endpoint-info"> <div class="endpoint-info">