Skip to content

Commit cc21802

Browse files
committed
remove header based apporach
1 parent ec4663b commit cc21802

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/handlers/responseHandlers.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ export async function afterRequestHookHandler(
263263

264264
if (!responseJSON) {
265265
// For streaming responses, check if beforeRequestHooks failed without deny enabled.
266-
const additionalHeaders = {
267-
'x-portkey-hook-results': JSON.stringify(hooksResult),
268-
};
269266
if (
270267
(failedBeforeRequestHooks.length || failedAfterRequestHooks.length) &&
271268
response.status === 200
@@ -275,12 +272,10 @@ export async function afterRequestHookHandler(
275272
...response,
276273
status: 246,
277274
statusText: 'Hooks failed',
278-
headers: { ...response.headers, ...additionalHeaders },
279275
});
280276
}
281277
return new Response(response.body, {
282278
...response,
283-
headers: { ...response.headers, ...additionalHeaders },
284279
});
285280
}
286281

0 commit comments

Comments
 (0)