From 5359703d49c4913711e18a513664349b761f7bf1 Mon Sep 17 00:00:00 2001 From: harlan Date: Sun, 3 Mar 2024 16:48:09 +1100 Subject: [PATCH] fix: set an `Unlighthouse` user agent by default --- packages/core/src/util.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/util.ts b/packages/core/src/util.ts index e4e740ce..106a1443 100644 --- a/packages/core/src/util.ts +++ b/packages/core/src/util.ts @@ -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