Skip to content

Commit

Permalink
Merge pull request #97 from cnxysoft/main
Browse files Browse the repository at this point in the history
修改下载函数
  • Loading branch information
MliKiowa authored Jul 2, 2024
2 parents fa5c7ad + 1457efa commit 0a01b8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/common/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0a01b8a

Please sign in to comment.