inspector/clients/web/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall fa441da85f
fix(web): harden the app-origin paths and correct three docs
Copilot review round 1 on #2100.

- POST /api/app-document: `null` and `[1,2]` are valid JSON, so the
  destructure that followed threw OUTSIDE the parse try/catch and turned a
  malformed body into a 500 instead of the documented 400.
- app-origin controller: the error handler cleared `server` but not
  `origin`, and `publish` gates on `origin` — so an error after a successful
  listen kept minting URLs on a dead port and the browser never took the
  srcdoc fallback. Clear both, and drop the now-unfetchable documents.
- sandbox proxy: drop a stale `srcdoc` before navigating to a dedicated
  origin (srcdoc wins over src), and restore the opaque-origin posture —
  strip `allow-same-origin`, reset `innerOrigin` — before assigning `srcdoc`
  on the fallback path. Not reachable today (each render remounts the
  iframe), but the cost of being wrong about that later is an isolation
  boundary.
- publishAppDocument tests: replace two `as unknown as Response` casts with
  real `Response`s.
- docs: `frame-ancestors` admits the proxy AND the Inspector page (every
  ancestor is checked); the shared helper falls back to loopback, not
  `'none'`; the showcase origin is `127.0.0.1`, the default bind address.
- tests: null/array body, post-listen error, and both factories receiving a
  working `publishAppDocument`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-24 08:45:40 -04:00
..
app-origin-controller.ts fix(web): harden the app-origin paths and correct three docs 2026-08-24 08:45:40 -04:00
browser-externalized-builtin-gate.ts build(web): fail vite build on a browser-externalized Node built-in (#1769) (#1777) 2026-07-25 19:45:11 -04:00
ensure-web-build.ts feat(web): build dist on demand for prod --web + end-to-end CI smoke (#1486) (#1497) 2026-06-16 18:34:52 -04:00
inject-auth-token.ts feat(auth): inject MCP_INSPECTOR_API_TOKEN into served index.html (#1378) (#1382) 2026-05-30 20:10:27 -04:00
resolve-bind-host.ts fix: bind loopback by address and pin the sandbox port so containers work 2026-08-15 12:33:27 -04:00
run-web.ts feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796) 2026-07-26 22:15:10 -04:00
sandbox-controller.ts fix(web): harden the app-origin paths and correct three docs 2026-08-24 08:45:40 -04:00
server.ts test(web): prove the dedicated app origin end to end 2026-08-24 08:45:40 -04:00
start-vite-dev-server.ts feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796) 2026-07-26 22:15:10 -04:00
types.ts Port v1.5 web dev backend (vite-hono-plugin + remote-server bootstrap) (#1321) 2026-05-18 19:22:14 -04:00
vite-base-config.ts fix(auth): refuse on a stuck lock, capture identity at the mkdir seam (#2082) 2026-08-23 11:31:37 -04:00
vite-hono-plugin.ts test(web): prove the dedicated app origin end to end 2026-08-24 08:45:40 -04:00
web-server-config.ts feat(web): honor _meta.ui.domain with a dedicated app origin 2026-08-24 08:45:40 -04:00