From c5feeff89a707f83f2d201dd73753c969e567827 Mon Sep 17 00:00:00 2001 From: Ou Date: Fri, 1 Nov 2024 20:27:09 +0800 Subject: [PATCH] fix: image proxy --- server/api/proxy/img.png.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/proxy/img.png.ts b/server/api/proxy/img.png.ts index 763dbb7..37a319a 100644 --- a/server/api/proxy/img.png.ts +++ b/server/api/proxy/img.png.ts @@ -1,7 +1,7 @@ export default defineEventHandler(async (event) => { const { url: img, type = "encodeURIComponent" } = getQuery(event) if (img) { - const url = type === "encodeURIComponent" ? encodeURIComponent(img as string) : decodeBase64URL(img as string) + const url = type === "encodeURIComponent" ? decodeURIComponent(img as string) : decodeBase64URL(img as string) return sendProxy(event, url, { headers: { "Access-Control-Allow-Origin": "*",