Scope knowledge and image libraries by brand
Frontend CI / Frontend (push) Successful in 2m59s
Backend CI / Backend (push) Successful in 14m58s

This commit is contained in:
2026-06-30 12:30:10 +08:00
parent 95ddb3057f
commit ced0c4ec0f
35 changed files with 1136 additions and 326 deletions
+5
View File
@@ -355,6 +355,8 @@ const currentBrandScopedPathPatterns = [
/^\/api\/tenant\/enterprise-sites\/[^/]+\/publish(?:\/|$)/,
/^\/api\/tenant\/media-supply\/orders(?:\/|$)/,
/^\/api\/tenant\/prompt-rules(?:\/|$)/,
/^\/api\/tenant\/knowledge(?:\/|$)/,
/^\/api\/tenant\/images(?:\/|$)/,
]
function shouldAttachCurrentBrandHeader(url: unknown): boolean {
@@ -362,6 +364,9 @@ function shouldAttachCurrentBrandHeader(url: unknown): boolean {
return false
}
const pathname = normalizeRequestPath(url)
if (pathname === '/api/tenant/images/storage-usage') {
return false
}
return currentBrandScopedPathPatterns.some((pattern) => pattern.test(pathname))
}