You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Embedding URLCode in another host: export a Response adapter; server-only protections #889
Found while hosting URLCode inside Hono (#887, proofs/ecosystem/). Embedding works, but only because the fixture's bridge copies core's unexported response rules. Several protections exist only in startServer.
No public way to turn a runtime result into an HTTP Response.prepareResponse, prepareStream, errorResponse and the error-code table (packages/core/src/http-response.ts:50, :95, :208, :167) are unexported. The only exported Node handler, createVercelHandler, runs as the vercel target, which refuses function routes. Proposal: a small exported toResponse/fetch adapter for the self-hosted target.
Trusted-proxy client resolution is server-only.compileTrustedProxies and resolveClient (client-address.ts:42, :68) are used only by startServer. Under Hono, X-Forwarded-For from a trusted proxy is ignored.
The loopback Host check (421) is server-only (client-address.ts:126, server.ts:349).
Other features missing under an embedded host: the health, ready and metrics probes and the readiness drain, the request log, admission, timeouts, stream limits and reload. Document them as server-only, or make them available to embedders.
Repeated request headers are lost on fetch-only hosts.headerCounts is optional (runtime.ts:90), and a missing count reads as 0. That weakens the duplicate-header refusals in match.ts:98, http-policy.ts:90 and extension-http.ts:191. Fetch-only hosts should declare that they can't provide counts, and the runtime should then refuse or fall back safely.
No base-path setting. Behind prefix-stripping mounts, redirects and a function's request.url lose the prefix.
urlcode review flags an in-process app.fetch(request) as an outbound network call (review.ts:106).
Activity
Embed URLCode in another host: createEmbeddedHandler shares core's re…
Small follow-ups: undelivered audit reporting, review app.fetch, Work…