mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-04-07 14:04:35 +08:00
[bug] Serve static content for "storage-fs" only; Fix bug 67908
This commit is contained in:
@ -85,12 +85,15 @@ for (let i in cfgStaticContent) {
|
||||
router.use(i, express.static(cfgStaticContent[i]['path'], cfgStaticContent[i]['options']));
|
||||
}
|
||||
}
|
||||
initCacheRouter(cfgCacheStorage, [cfgCacheStorage.cacheFolderName]);
|
||||
|
||||
let persistentRouts = [cfgForgottenFiles, cfgErrorFiles];
|
||||
persistentRouts.filter((rout) => {return rout && rout.length > 0;});
|
||||
if (persistentRouts.length > 0) {
|
||||
initCacheRouter(cfgPersistentStorage, [cfgForgottenFiles, cfgErrorFiles]);
|
||||
if (cfgCacheStorage.name === "storage-fs") {
|
||||
initCacheRouter(cfgCacheStorage, [cfgCacheStorage.cacheFolderName]);
|
||||
}
|
||||
if (cfgPersistentStorage.name === "storage-fs") {
|
||||
let persistentRouts = [cfgForgottenFiles, cfgErrorFiles];
|
||||
persistentRouts.filter((rout) => {return rout && rout.length > 0;});
|
||||
if (persistentRouts.length > 0) {
|
||||
initCacheRouter(cfgPersistentStorage, [cfgForgottenFiles, cfgErrorFiles]);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user