mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(ofetch): use late-binding fetch in ofetch to ensure request-rewriter intercepts bundled builds (#21518)
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ declare module 'ofetch' {
|
||||
|
||||
config.enableRemoteDebugging && process.env.NODE_ENV === 'dev' && register();
|
||||
|
||||
const rofetch = createFetch().create({
|
||||
const rofetch = createFetch({ fetch: (...args: Parameters<typeof fetch>) => globalThis.fetch(...args) }).create({
|
||||
retryStatusCodes: [400, 408, 409, 425, 429, 500, 502, 503, 504],
|
||||
retry: config.requestRetry,
|
||||
retryDelay: 1000,
|
||||
|
||||
Reference in New Issue
Block a user