(origin: string)
| 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 | } |
no test coverage detected