mcp: accept /mcp/<token>/<anything> so a fresh connector URL can bust claude.ai's cached tools and UI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mBuCaQSgWwqhtzsmTBQuM
This commit is contained in:
1 parent
2b1993ba9f
commit
7fad367d16
1 file changed
+1
-1
+1
-1
@@ -167,7 +167,7 @@ export default {
|
||||
if (req.method === "OPTIONS") return new Response(null, { headers: CORS });
|
||||
if (url.pathname === "/health") return new Response("ok gandora-mcp 0.0.2 inference=" + (env.INFERENCE ? "bound" : "missing"), { headers: CORS });
|
||||
const want = env.TOKEN ? "/mcp/" + env.TOKEN : "/mcp";
|
||||
if (url.pathname !== want) return new Response("gandora mcp spike", { status: 404, headers: CORS });
|
||||
if (url.pathname !== want && !url.pathname.startsWith(want + "/")) return new Response("gandora mcp spike", { status: 404, headers: CORS });
|
||||
if (req.method !== "POST") return new Response(null, { status: 405, headers: CORS });
|
||||
let body;
|
||||
try { body = await req.json(); } catch { return Response.json({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "parse error" } }, { status: 400, headers: CORS }); }
|
||||
|
||||
Reference in new issue
Block a user