@tokenoftrust/storefront-runner 4.11.8 → 4.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,14 +50,19 @@ export class FetchShipGrantTransport implements ViewerShipGrantGetTransport {
50
50
  // every admin tab), so an unbounded hang stalls the whole document stream. A
51
51
  // timeout aborts to the documented deny-default (the resolver maps any transport/
52
52
  // timeout fault to `preview-access`) — never a render-blocking wait on a slow MCP.
53
- // `redirect: "error"`: a redirect would carry the service-secret header to another origin,
54
- // so it rejects (a transport fault, so a deny) and nothing is sent to the redirect target.
53
+ // `redirect: "manual"`, then a 3xx throws: a followed redirect would carry the service-secret
54
+ // header to another origin, so a redirect is a transport fault (a deny) and nothing is sent to
55
+ // its target. Not `redirect: "error"`: the Workers runtime rejects that value before the request
56
+ // leaves, so every lookup would deny without ever reaching tot-mcp.
55
57
  const res = await fetch(url, {
56
58
  method: "GET",
57
59
  headers,
58
- redirect: "error",
60
+ redirect: "manual",
59
61
  signal: AbortSignal.timeout(2500),
60
62
  });
63
+ if ((res.status >= 300 && res.status < 400) || res.type === "opaqueredirect") {
64
+ throw new Error("grant authority answered a redirect; refused");
65
+ }
61
66
  return { status: res.status, json: () => res.json() };
62
67
  }
63
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "4.11.8",
3
+ "version": "4.11.9",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",