From 16de68b966bfe0d15c101245adddcba19bdc4a6e Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Sun, 15 Sep 2024 22:47:56 +0800 Subject: [PATCH] fix: change the avatar mirror. --- options.ts | 2 +- src/pages/avatar/[hash].webp.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/options.ts b/options.ts index a813022..da1346c 100644 --- a/options.ts +++ b/options.ts @@ -186,7 +186,7 @@ const options: z.input = { server: 'https://comment.yufan.me', size: 10, avatar: { - mirror: 'https://gravatar.webp.se/avatar', + mirror: 'https://weavatar.com/avatar', size: 120, }, }, diff --git a/src/pages/avatar/[hash].webp.ts b/src/pages/avatar/[hash].webp.ts index b1e5653..178a2c1 100644 --- a/src/pages/avatar/[hash].webp.ts +++ b/src/pages/avatar/[hash].webp.ts @@ -18,7 +18,7 @@ const avatarImage = async ( const defaultAvatarLink = defaultAvatar(); const link = urlJoin( options.settings.comments.avatar.mirror, - `${hash}?s=${options.settings.comments.avatar.size}&d=${defaultAvatarLink}`, + `${hash}.webp?s=${options.settings.comments.avatar.size}&d=${defaultAvatarLink}`, ); const resp = await fetch(link, { redirect: 'manual', headers: { Referer: options.website } });