From 319d8e7fdf23d9693b52fc6daa60b2101eb1a797 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 16 Oct 2022 03:17:06 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/index.js b/server/index.js index f6305d1..bcf3442 100644 --- a/server/index.js +++ b/server/index.js @@ -205,13 +205,13 @@ function initStatic(app, config) { }); //заголовки при отдаче - const filesDir = `${config.publicDir}/files`; + const filesDir = utils.toUnixPath(`${config.publicDir}/files`); app.use(express.static(config.publicDir, { setHeaders: (res, filePath) => { //res.set('Cache-Control', 'no-cache'); //res.set('Expires', '-1'); - if (utils.toUnixPath(path.dirname(filePath)) == utils.toUnixPath(filesDir)) { + if (utils.toUnixPath(path.dirname(filePath)) == filesDir) { res.set('Content-Encoding', 'gzip'); if (res.downFileName)