fix(static): корректный путь к /avatars (был на уровень выше реальной папки)
This commit is contained in:
@@ -313,7 +313,7 @@ const staticCache = isProd ? { maxAge: '7d' } : { setHeaders: (res) => res.setHe
|
|||||||
app.use('/js', express.static(jsDir, staticCache));
|
app.use('/js', express.static(jsDir, staticCache));
|
||||||
app.use('/css', express.static(path.join(frontendDir, 'css'), staticCache));
|
app.use('/css', express.static(path.join(frontendDir, 'css'), staticCache));
|
||||||
app.use('/img', express.static(path.join(frontendDir, 'img'), 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)
|
// Redirect legacy .html URLs → clean URLs (301)
|
||||||
app.use((req, res, next) => {
|
app.use((req, res, next) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user