This commit is contained in:
암냥 2026-06-26 07:58:24 +09:00
commit 3344d6d532
6 changed files with 150 additions and 35 deletions

View file

@ -250,7 +250,7 @@ export default function AddPage() {
const data = (await response.json()) as PixivApiResponse;
const items = (data.image_proxy_urls ?? [])
.filter((imageUrl): imageUrl is string => typeof imageUrl === "string" && imageUrl.length > 0)
.map((imageUrl) => ({ url: imageUrl }));
.map((imageUrl) => ({ url: proxyMediaUrl(imageUrl) }));
if (items.length === 0) throw new Error("이미지를 찾지 못했습니다.");

View file

@ -3,6 +3,7 @@ const PROXIED_HOSTS = [
"video.twimg.com",
"ton.twimg.com",
"abs.twimg.com",
"i.pximg.net",
];
export function proxyMediaUrl(url: string | undefined | null): string {