Skip to content

http

Pieces the web process and the indexer share. Package @unset/shared-http. The web server is web. This folder has no server, no CSRF gate and no route table. The Hono server and the CSRF gate were deleted in P1.20k (shared/http/index.ts).

Owns

Exports are shared/http/index.ts.

FileWhat it holds
shared/http/config.tshostAllowed, httpKitConfig.
shared/http/headers.tsSECURITY_HEADERS.
shared/http/health.tscreateHealth.
shared/http/shutdown.tsdrain, exitOnSignals.
shared/http/clientIp.tsClientIp.
shared/http/trustedProxy.tscreateClientIpResolver.
shared/http/returnPath.tssafeReturnPath, the only way a redirect target is chosen from input.
shared/http/limits/rateLimit.tsToken buckets.
shared/http/limits/policy.tsdefinePolicies.

On this tree the product importers are interfaces/web and interfaces/indexer (exitOnSignals in interfaces/indexer/main.ts). apps/ does not import it. Who else may import it is the shared table.