Skip to content

Commit

Permalink
fix: remove default got user-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed May 24, 2021
1 parent 499b09e commit d65187c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/helpers/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ const cacheable = new CacheableLookup({
});

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

Expand Down

0 comments on commit d65187c

Please sign in to comment.