From f0684c19576c6c8d8ec880386b377700815574d2 Mon Sep 17 00:00:00 2001 From: 17hz <0x149527@gmail.com> Date: Wed, 20 Aug 2025 23:15:18 +0800 Subject: [PATCH] Fix the bug of automatically appending basepath to image resource. (#24201) --- web/app/routePrefixHandle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/routePrefixHandle.tsx b/web/app/routePrefixHandle.tsx index ee4ef722f..464910782 100644 --- a/web/app/routePrefixHandle.tsx +++ b/web/app/routePrefixHandle.tsx @@ -10,7 +10,7 @@ export default function RoutePrefixHandle() { const addPrefixToImg = (e: HTMLImageElement) => { const url = new URL(e.src) const prefix = url.pathname.slice(0, basePath.length) - if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:')) { + if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:') && !url.href.startsWith('http')) { url.pathname = basePath + url.pathname e.src = url.toString() }