mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
fix: #8549 send 308 Permanent Redirect on topic/category shortlinks
This commit is contained in:
@@ -39,7 +39,7 @@ categoryController.get = async function (req, res, next) {
|
||||
}
|
||||
|
||||
if (!res.locals.isAPI && (!req.params.slug || categoryFields.slug !== cid + '/' + req.params.slug) && (categoryFields.slug && categoryFields.slug !== cid + '/')) {
|
||||
return helpers.redirect(res, '/category/' + categoryFields.slug);
|
||||
return helpers.redirect(res, '/category/' + categoryFields.slug, true);
|
||||
}
|
||||
|
||||
const topicCount = categoryFields.topic_count;
|
||||
|
||||
Reference in New Issue
Block a user