From 4814d5edebd5b121e8fad4845916f6ff409192c3 Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Fri, 29 May 2026 14:33:30 +0300 Subject: [PATCH] =?UTF-8?q?fix(static):=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D1=82=D0=BD=D1=8B=D0=B9=20=D0=BF=D1=83=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BA=20/avatars=20(=D0=B1=D1=8B=D0=BB=20=D0=BD=D0=B0=20=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D0=BD=D1=8C=20=D0=B2=D1=8B=D1=88=D0=B5?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B9=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BF=D0=BA=D0=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/server.js b/backend/src/server.js index e192811..2e19cd3 100644 --- a/backend/src/server.js +++ b/backend/src/server.js @@ -313,7 +313,7 @@ const staticCache = isProd ? { maxAge: '7d' } : { setHeaders: (res) => res.setHe app.use('/js', express.static(jsDir, staticCache)); app.use('/css', express.static(path.join(frontendDir, 'css'), staticCache)); app.use('/img', express.static(path.join(frontendDir, 'img'), staticCache)); -app.use('/avatars', express.static(path.join(__dirname, '../../uploads/avatars'), { maxAge: '1d' })); +app.use('/avatars', express.static(path.join(__dirname, '../uploads/avatars'), { maxAge: '1d' })); // Redirect legacy .html URLs → clean URLs (301) app.use((req, res, next) => {