Remove http-proxy bundle primitive#370
Merged
Merged
Conversation
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).
ab214de to
4bc5fa4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. anastro preview, a Jupyter kernel) through a same-origin platform route, and doesn't belong in the core baseline.Removed
/v1/ws/<wsId>/apps/<bundle>/<mount>/*proxy forwarder (src/api/routes/proxy.ts) and its registration inapp.ts.extractHttpProxy+HttpProxyConfig, and thehttpProxyfield onBundleInstance/LocalBundleMeta.NB_PROXY_PREFIX. With the proxy gone,serverNameandmanifestMetaonPlatformContextbecame vestigial (they only fed the proxy prefix), so they're removed too —buildPlatformEnvnow just emitsNB_WORKSPACE_ID+NB_PUBLIC_ORIGIN.Workspace.allowHttpProxy.X-NB-Skip-Security-Defaults(SKIP_DEFAULTS_HEADER) escape hatch — its only producer was the proxy route. TheX-Frame-Optionsdefault-vs-override behavior stays.proxy-route.test.ts,extract-http-proxy.test.ts, theNB_PROXY_PREFIXcases inbuild-platform-env.test.ts, theSKIP_DEFAULTScase insecurity-headers.test.ts, andhttpProxy: nullfrom shared test fixtures.Removedentry).The
allowHttpProxystring inheal-truncated-personal-workspacesis left as-is — it's a generic "unknown field the allowlist rejects" example, decoupled from theWorkspacetype.Verification
bun run verify:static— passbun run test:unit— passbun run test:integration— 638 pass / 0 fail