Skip to content

Commit d65187c

Browse files
committed
fix: remove default got user-agent
1 parent 499b09e commit d65187c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/helpers/request.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ const cacheable = new CacheableLookup({
1313
});
1414

1515
module.exports = async function request(options) {
16+
Object.assign(options, {
17+
url: new URL(options.url),
18+
headers: options.headers || {},
19+
});
1620
// eslint-disable-next-line no-param-reassign
17-
options.url = new URL(options.url);
21+
options.headers['user-agent'] = undefined;
1822
const { timeout, agent, lookup } = instance(this).configuration('httpOptions')(new URL(options.url));
1923
const helperOptions = omitBy({ timeout, agent, lookup }, Boolean);
2024

0 commit comments

Comments
 (0)