fix: #8549 send 308 Permanent Redirect on topic/category shortlinks

This commit is contained in:
Julian Lam
2020-08-06 10:48:35 -04:00
parent def16f9e97
commit 68f8d6e3a1
3 changed files with 4 additions and 4 deletions

View File

@@ -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;