Skip to content

Commit

Permalink
only apply default Host when custom Host is not set, #139
Browse files Browse the repository at this point in the history
  • Loading branch information
Last-Order committed Nov 21, 2024
1 parent af683e9 commit 2f0e9d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function download(url: string, path: string, options: AxiosRequestConfig
responseType: "arraybuffer",
httpsAgent: proxyAgentInstance ? proxyAgentInstance : undefined,
headers: {
Host: new URL(url).host,
...(!axios.defaults.headers.common["Host"] ? { Host: new URL(url).host } : {}),
},
cancelToken: source.token,
...options,
Expand Down

0 comments on commit 2f0e9d1

Please sign in to comment.