From 88bcf0a6453355d9d1bf8868f22e263d9143d3af Mon Sep 17 00:00:00 2001 From: PauI Ostrovckij Date: Wed, 4 Feb 2026 07:53:20 +0300 Subject: [PATCH] [fix] Add support for tenant-aware persistent storage in the static router; Fix bug 79463 --- DocService/sources/routes/static.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DocService/sources/routes/static.js b/DocService/sources/routes/static.js index 37fd7699..f821efc2 100644 --- a/DocService/sources/routes/static.js +++ b/DocService/sources/routes/static.js @@ -86,7 +86,8 @@ function createCacheMiddleware(prefix, rootPath, cfgStorage, secret, rout) { const ctx = new operationContext.Context(); ctx.initFromRequest(req); await ctx.initTenantCache(); - const tenantStorageCfg = ctx.getCfg('storage', cfgStorage); + const configKey = rout === cfgForgottenFiles || rout === cfgErrorFiles ? 'persistentStorage' : 'storage'; + const tenantStorageCfg = ctx.getCfg(configKey, cfgStorage); const urlParsed = urlModule.parse(req.url, true); const {md5, expires} = urlParsed.query; @@ -160,7 +161,7 @@ for (const i in cfgStaticContent) { if (storage.needServeStatic() || tenantManager.isMultitenantMode()) { initCacheRouter(cfgCacheStorage, [cfgCacheStorage.cacheFolderName]); } -if (storage.needServeStatic(cfgForgottenFiles)) { +if (storage.needServeStatic(cfgForgottenFiles) || tenantManager.isMultitenantMode()) { let persistentRouts = [cfgForgottenFiles, cfgErrorFiles]; persistentRouts = persistentRouts.filter(rout => { return rout && rout.length > 0;