Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix the bug of automatically appending basepath to image resource. (#24201)

17hzf0684c19576c
diff --git a/web/app/routePrefixHandle.tsx b/web/app/routePrefixHandle.tsx
index ee4ef722fc8..464910782d1 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()
}