Skip to content

Commit

Permalink
refactor(ipx): use event.node.req and event.node.res (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 22, 2023
1 parent c3f31ce commit da351a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ipx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const ipxSetup: ProviderSetup = async (providerOptions, moduleOptions) =>
nuxt.options.devServerHandlers.push({
route: '/_ipx',
handler: eventHandler(async (event) => {
await middleware(event.req, event.res)
await middleware(event.node.req, event.node.res)
})
})
}
4 changes: 2 additions & 2 deletions src/runtime/ipx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default lazyEventHandler(() => {
const middleware = createIPXMiddleware(ipx)

return eventHandler(async (event) => {
event.req.url = withLeadingSlash(event.context.params._)
await middleware(event.req, event.res)
event.node.req.url = withLeadingSlash(event.context.params._)
await middleware(event.node.req, event.node.res)
})
})

0 comments on commit da351a6

Please sign in to comment.