Skip to content

Node.js based forum software built for the modern web

fix ajax 404 err when base url isn't root (#5285)

xucheng40d73e2a5442
diff --git a/src/routes/index.js b/src/routes/index.js
index f36ad1468a..e9943e0dae 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -148,7 +148,7 @@ module.exports = function (app, middleware, hotswapIds) {
app.use(relativePath, express.static(path.join(__dirname, '../../', 'public'), {
maxAge: app.enabled('cache') ? 5184000000 : 0
}));
- app.use('/vendor/jquery/timeago/locales', middleware.processTimeagoLocales);
+ app.use(relativePath + '/vendor/jquery/timeago/locales', middleware.processTimeagoLocales);
app.use(controllers.handle404);
app.use(controllers.handleURIErrors);
app.use(controllers.handleErrors);