Skip to content

Fix WebMCP topic reads on preview deployments - #262

Open
jdevalk wants to merge 1 commit into
mainfrom
webmcp-relative-mdurl
Open

jdevalk wants to merge 1 commit into
mainfrom
webmcp-relative-mdurl

Conversation

@jdevalk

@jdevalk jdevalk commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Same bug Joost fixed on specification.email (PR #3, commit 32d0006), present here too: the manifest's mdUrl was absolute (site.url), so on Cloudflare Pages preview deployments get_topic fetched the production Markdown instead of the preview's — blocked by this site's connect-src 'self' CSP.

Makes mdUrl root-relative; the canonical url stays absolute. Adds the same per-origin regression test (preview.example.pages.dev + local dev) to scripts/test-webmcp.mjs.

Verified: full build + check-integrity pass, test:webmcp 7/7, eslint clean (0 errors), Prettier clean.

The manifest's mdUrl was absolute (site.url), so on Cloudflare Pages
preview deployments get_topic fetched the production Markdown instead of
the preview's — blocked by the site's connect-src 'self' CSP. Make mdUrl
root-relative; the canonical url stays absolute. Adds the same
per-origin regression test as specification.email.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specification-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ede509
Status: ✅  Deploy successful!
Preview URL: https://7d16450a.specification-website.pages.dev
Branch Preview URL: https://webmcp-relative-mdurl.specification-website.pages.dev

View logs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant