MCPcopy Create free account
hub / github.com/Effect-TS/effect / probe

Function probe

packages/ui/devtools/test/DevToolsServer.test.ts:742–751  ·  view source on GitHub ↗
(origin: string)

Source from the content-addressed store, hash-verified

740 assert.strictEqual(mcpStatus, 403)
741 for (const path of ["/log", "/control"]) {
742 const probe = (origin: string) =>
743 probeStatus(url + path, {
744 headers: {
745 connection: "Upgrade",
746 upgrade: "websocket",
747 "sec-websocket-version": "13",
748 "sec-websocket-key": "dGhlIHNhbXBsZSBub25jZQ==",
749 origin
750 }
751 })
752 assert.strictEqual(yield* probe("http://evil.example"), 403, path)
753 assert.strictEqual(yield* probe("http://localhost:5173"), 101, path)
754 }

Callers 1

Calls 1

probeStatusFunction · 0.85

Tested by

no test coverage detected