fix: download file add referer

This commit is contained in:
linyuchen
2024-09-10 15:01:50 +08:00
parent ce6886011f
commit 92d780cf70
4 changed files with 4 additions and 4 deletions

View File

@@ -133,7 +133,7 @@ export async function uri2local(uri: string, filename?: string, needExt?: boolea
if (type === FileUriType.RemoteURL) {
try {
const res = await fetchFile(uri)
const res = await fetchFile(uri, {'Referer': uri})
const match = res.url.match(/.+\/([^/?]*)(?=\?)?/)
if (match?.[1]) {
filename ??= match[1].replace(/[/\\:*?"<>|]/g, '_')

View File

@@ -1 +1 @@
export const version = '3.32.1'
export const version = '3.32.2'