Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 3, 2022
1 parent 4704d2d commit 8a2ef5b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/utils/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ export async function proxyRequest (event: H3Event, target: string, opts: ProxyO
Object.assign(headers, opts.headers)
}

const fetchOptions: RequestInit = {
headers,
method,
body,
...opts.fetchOptions
}

return sendProxy(event, target, {
...opts,
fetchOptions
fetchOptions: {
headers,
method,
body,
...opts.fetchOptions
}
})
}

Expand Down

0 comments on commit 8a2ef5b

Please sign in to comment.