wow
This commit is contained in:
parent
a5c4a74a69
commit
3344d6d532
6 changed files with 150 additions and 35 deletions
|
|
@ -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("이미지를 찾지 못했습니다.");
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue