From 79bd89714643376634ded543d06996df7953c0fa Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 2 Jun 2023 07:40:30 +0800 Subject: [PATCH] #273 fix renderer side user agent (#645) --- modules/desktop/src/libs/v1-client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/desktop/src/libs/v1-client.ts b/modules/desktop/src/libs/v1-client.ts index cf70952..afe7b02 100644 --- a/modules/desktop/src/libs/v1-client.ts +++ b/modules/desktop/src/libs/v1-client.ts @@ -13,6 +13,7 @@ export async function get( console.log(`GET /v1/${urlPath}`); const headers = await getHeaders(`GET/${urlPath}`); + delete headers["User-Agent"]; // this is in the browser, not allowed to modify UserAgent const req = await axios.request({ method: "GET",