Skip to content

Commit 0ddebfe

Browse files
committed
fix: the auth header issue has been solved
1 parent 85ce70c commit 0ddebfe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

playgrounds/firecamp-rest/src/store/slices/execution.slice.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,16 @@ const createExecutionSlice: TStoreSlice<IExecutionSlice> = (set, get) => ({
147147
},
148148

149149
prepareRequestForExecution: () => {
150-
const { request, prepareAuthForExecution, prepareScriptsForExecution } =
151-
get();
150+
const {
151+
request,
152+
runtime: { authHeaders = [] },
153+
prepareAuthForExecution,
154+
prepareScriptsForExecution,
155+
} = get();
152156
const auth = prepareAuthForExecution();
153157
const { preScripts, postScripts } = prepareScriptsForExecution();
154158
return {
155-
...request,
159+
...{ ...request, headers: [...request.headers, ...authHeaders] }, // merge auth headers to main headers
156160
auth,
157161
preScripts,
158162
postScripts,

0 commit comments

Comments
 (0)