Merge pull request from cnxysoft/main

修改下载函数
This commit is contained in:
手瓜一十雪
2024-07-02 10:13:15 +08:00
committed by GitHub

@@ -148,6 +148,8 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
};
if (typeof options === 'string') {
url = options;
const host = new URL(url).hostname;
headers['Host'] = host;
} else {
url = options.url;
if (options.headers) {