fix(static): корректный путь к /avatars (был на уровень выше реальной папки)

This commit is contained in:
Maxim Dolgolyov
2026-05-29 14:33:30 +03:00
parent 19ce8728e5
commit 4814d5edeb
+1 -1
View File
@@ -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) => {