@dench.com/cli 3.11.41-staging.864 → 3.11.42-staging.870
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.
|
@@ -267,6 +267,13 @@ export type EnrichmentGatewayOptions = {
|
|
|
267
267
|
* loop so callers (e.g. SSE clients that disconnect) can stop in-flight work.
|
|
268
268
|
*/
|
|
269
269
|
signal?: AbortSignal;
|
|
270
|
+
/**
|
|
271
|
+
* Extra request headers, e.g. the web app's signed member user context so
|
|
272
|
+
* the gateway credits the charge to the person who ran it (DEN-241). A
|
|
273
|
+
* function is called per request, so a long Find loop never sends an
|
|
274
|
+
* expired signature. Cannot override `Authorization` or `content-type`.
|
|
275
|
+
*/
|
|
276
|
+
headers?: () => Record<string, string>;
|
|
270
277
|
};
|
|
271
278
|
|
|
272
279
|
// ---------------------------------------------------------------------------
|
|
@@ -1715,6 +1722,7 @@ async function callGatewayJson(
|
|
|
1715
1722
|
const response = await fetchImpl(url, {
|
|
1716
1723
|
method: args.method,
|
|
1717
1724
|
headers: {
|
|
1725
|
+
...args.options.headers?.(),
|
|
1718
1726
|
...(args.method === "POST" ? { "content-type": "application/json" } : {}),
|
|
1719
1727
|
Authorization: `Bearer ${apiKey}`,
|
|
1720
1728
|
},
|