Skip to content

Commit

Permalink
Merge a2504e5 into 95f2d48
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Oct 26, 2021
2 parents 95f2d48 + a2504e5 commit e399d97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ function buildRequest (opts) {
done(new Error('unix socket not supported with undici yet'))
return
} else {
const options = getUndiciOptions(undiciOpts)
options.dispatcher = undiciAgent
pool = new undici.Pool(baseUrl || opts.url.origin, options)
req.origin = baseUrl || opts.url.origin
pool = undiciAgent
}

// remove forbidden headers
Expand Down
2 changes: 1 addition & 1 deletion test/undici-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { getUndiciOptions } = require('../lib/request')

const instance = Fastify()

t.plan(7)
t.plan(6)
t.teardown(instance.close.bind(instance))

const target = http.createServer((req, res) => {
Expand Down

0 comments on commit e399d97

Please sign in to comment.