mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-09-28 12:07:57 +00:00
commit
0a01b8ade9
@ -148,6 +148,8 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
|
|||||||
};
|
};
|
||||||
if (typeof options === 'string') {
|
if (typeof options === 'string') {
|
||||||
url = options;
|
url = options;
|
||||||
|
const host = new URL(url).hostname;
|
||||||
|
headers['Host'] = host;
|
||||||
} else {
|
} else {
|
||||||
url = options.url;
|
url = options.url;
|
||||||
if (options.headers) {
|
if (options.headers) {
|
||||||
|
Loading…
Reference in New Issue
Block a user