Skip to content

Remove http-proxy bundle primitive#370

Merged
mgoldsborough merged 1 commit into
mainfrom
remove-http-proxy
Jun 3, 2026
Merged

Remove http-proxy bundle primitive#370
mgoldsborough merged 1 commit into
mainfrom
remove-http-proxy

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

What

Removes the _meta["ai.nimblebrain/http-proxy"] bundle capability and all its plumbing. It was a stopgap for exposing a bundle's own loopback HTTP server (e.g. an astro preview, a Jupyter kernel) through a same-origin platform route, and doesn't belong in the core baseline.

Removed

  • Route: /v1/ws/<wsId>/apps/<bundle>/<mount>/* proxy forwarder (src/api/routes/proxy.ts) and its registration in app.ts.
  • Manifest parsing: extractHttpProxy + HttpProxyConfig, and the httpProxy field on BundleInstance / LocalBundleMeta.
  • Env injection: NB_PROXY_PREFIX. With the proxy gone, serverName and manifestMeta on PlatformContext became vestigial (they only fed the proxy prefix), so they're removed too — buildPlatformEnv now just emits NB_WORKSPACE_ID + NB_PUBLIC_ORIGIN.
  • Kill switch: Workspace.allowHttpProxy.
  • Security middleware: the X-NB-Skip-Security-Defaults (SKIP_DEFAULTS_HEADER) escape hatch — its only producer was the proxy route. The X-Frame-Options default-vs-override behavior stays.
  • Tests: proxy-route.test.ts, extract-http-proxy.test.ts, the NB_PROXY_PREFIX cases in build-platform-env.test.ts, the SKIP_DEFAULTS case in security-headers.test.ts, and httpProxy: null from shared test fixtures.
  • CHANGELOG: the unreleased entry is dropped (never shipped, so no Removed entry).

The allowHttpProxy string in heal-truncated-personal-workspaces is left as-is — it's a generic "unknown field the allowlist rejects" example, decoupled from the Workspace type.

Verification

  • bun run verify:static — pass
  • bun run test:unit — pass
  • bun run test:integration — 638 pass / 0 fail

@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Jun 3, 2026
Removes the `_meta["ai.nimblebrain/http-proxy"]` capability and all its
plumbing. It was a stopgap for embedding a bundle's own loopback HTTP
server (e.g. an `astro preview`) through a same-origin platform route and
shouldn't be part of the core baseline.

Removed:
- `/v1/ws/<wsId>/apps/<bundle>/<mount>/*` proxy route and its registration
- `extractHttpProxy` / `HttpProxyConfig` and the `httpProxy` field on
  bundle metadata and instances
- `NB_PROXY_PREFIX` env injection (and the now-vestigial `serverName` /
  `manifestMeta` fields on `PlatformContext`)
- `Workspace.allowHttpProxy` per-workspace kill switch
- `X-NB-Skip-Security-Defaults` header escape hatch in security-headers
  middleware (its only producer was the proxy route)
- the feature's tests and the unreleased CHANGELOG entry

The never-released changelog line is simply dropped (no Removed entry).
@mgoldsborough mgoldsborough merged commit 97babbc into main Jun 3, 2026
4 checks passed
@mgoldsborough mgoldsborough deleted the remove-http-proxy branch June 3, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant