Chore: add fetch UA

This commit is contained in:
SukkaW
2023-11-20 15:45:44 +08:00
parent 5ea91fa9a4
commit 0bdc69523a
8 changed files with 25 additions and 14 deletions

View File

@@ -1,4 +1,10 @@
// @ts-expect-error -- missing types
import createFetchRetry from '@vercel/fetch-retry';
export const defaultRequestInit: RequestInit = {
headers: {
'User-Agent': 'curl/8.1.2 (https://github.com/SukkaW/Surge)'
}
}
export const fetchWithRetry: typeof fetch = createFetchRetry(fetch);