Repository navigation
radius-sdk@0.6.0
·
67 commits
to main
since this release
Minor Changes
- 726a7a8:
proxyTo(origin)(fromradius-sdk/serverandradius-sdk/hono) forwards a request to an origin you do not change, for a seller in front of it:pay.wrap(proxyTo(origin)), orapp.all('/*', (c) => toOrigin(c.req.raw))after the Hono middleware. It keeps the method, path and query, buffers the body (a stream body needsduplexon Node), dropsHost, hop-by-hop headers (Node'sfetchthrows onKeep-Alive,Expectand others) and payment credentials, asks forAccept-Encoding: identityand dropsContent-Encoding/Content-Lengthwhenfetchdecoded a compressed body anyway, passes the request'ssignalso a disconnect aborts the origin request, returns redirects unfollowed, and copies the response headers so the receipt can be added.
Patch Changes
- 8175dda: Package metadata points at the renamed repository, github.com/radiustechsystems/tools.
- 67ea7ce: A paid route whose handler returns a
fetch()response no longer fails after settlement under@hono/node-server. The server's globalResponsekept the origin's immutable headers, so adding the receipt threwTypeError: immutable: withsettle: 'before'the payer was charged and got a 500, and with'after'a 402. The SDK now copies the headers before it adds the receipt.