Skip to content

Commit

Permalink
fix(proxy): restore ctx before return
Browse files Browse the repository at this point in the history
  • Loading branch information
mav-rik committed Feb 6, 2023
1 parent f045ed6 commit 21aa564
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/http-proxy/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const resHeadersToBlock = [
export function useProxy() {
const status = useStatus()
const { setHeader, headers: getSetHeaders } = useSetHeaders()
const { req } = useHttpContext().getCtx().event
const { restoreCtx, getCtx } = useHttpContext()
const { req } = getCtx().event

const setHeadersObject = getSetHeaders()

Expand Down Expand Up @@ -89,6 +90,7 @@ export function useProxy() {
}
}

restoreCtx()
return resp
}
}

0 comments on commit 21aa564

Please sign in to comment.