feat: 301 302自动跟随下载

This commit is contained in:
手瓜一十雪
2025-04-21 18:43:44 +08:00
parent 88b86611a3
commit 5db7a90a24

View File

@@ -115,7 +115,7 @@ async function tryDownload(options: string | HttpDownloadOptions, useReferer: bo
if (useReferer && !headers['Referer']) {
headers['Referer'] = url;
}
const fetchRes = await fetch(url, { headers }).catch((err) => {
const fetchRes = await fetch(url, { headers, redirect: 'follow' }).catch((err) => {
if (err.cause) {
throw err.cause;
}