fix: load instagram image fail

close #1539
This commit is contained in:
Stephen Zhou 2024-11-13 22:03:38 +08:00
parent 0ca5abc3be
commit f8fd58f78e
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View File

@ -27,11 +27,9 @@ export const replaceImgUrlIfNeed = (url?: string) => {
}
}
if (isWebBuild) {
for (const rule of imageRefererMatches) {
if (rule.url.test(url)) {
return getImageProxyUrl({ url, width: 0, height: 0 })
}
for (const rule of imageRefererMatches) {
if ((isWebBuild || rule.force) && rule.url.test(url)) {
return getImageProxyUrl({ url, width: 0, height: 0 })
}
}
return url

View File

@ -25,7 +25,8 @@ export const imageRefererMatches = [
},
{
url: /^https:\/\/sp1\.piokok\.com/,
referer: "https://sp1.piokok.com",
referer: "https://www.piokok.com",
force: true,
},
]