Merge pull request #97 from cnxysoft/main

修改下载函数
This commit is contained in:
手瓜一十雪 2024-07-02 10:13:15 +08:00 committed by GitHub
commit 0a01b8ade9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {