Skip to content

Commit

Permalink
Additional cross-flow invoke headers (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
pattra authored Dec 11, 2024
1 parent e1c793c commit f9d097d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/spectral/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prismatic-io/spectral",
"version": "10.3.4",
"version": "10.3.5",
"description": "Utility library for building Prismatic connectors and code-native integrations",
"keywords": ["prismatic"],
"main": "dist/index.js",
Expand Down
6 changes: 6 additions & 0 deletions packages/spectral/src/serverTypes/perform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ export const createInvokeFlow = <const TFlows extends Readonly<string[]>>(
...config,
headers: {
...(config?.headers ?? {}),
...(context.webhookApiKeys[flowName]?.length > 0
? {
"Api-Key": context.webhookApiKeys[flowName][0],
}
: {}),
"prismatic-invoked-by": formatExecutionFrameHeaders(context.executionFrame, sourceToUse),
"prismatic-invoke-type": "Cross Flow",
"prismatic-executionid": context.executionId,
},
});
};
Expand Down

0 comments on commit f9d097d

Please sign in to comment.