Skip to content

Commit

Permalink
fix: set an Unlighthouse user agent by default
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Mar 3, 2024
1 parent b2923fa commit 5359703
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export async function fetchUrlRaw(url: string, resolvedConfig: ResolvedUserConfi
axiosOptions.auth = resolvedConfig.auth

axiosOptions.headers = axiosOptions.headers || {}
axiosOptions.headers['User-Agent'] = axiosOptions.headers['User-Agent'] || 'Unlighthouse'

if (resolvedConfig.cookies) {
axiosOptions.headers.Cookie = resolvedConfig.cookies
Expand Down

0 comments on commit 5359703

Please sign in to comment.