Scope knowledge and image libraries by brand
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user