mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: set noindex tag on remote profiles as well
This commit is contained in:
@@ -55,6 +55,7 @@ profileController.get = async function (req, res, next) {
|
||||
|
||||
if (!utils.isNumber(userData.uid)) {
|
||||
res.set('Link', `<${userData.url || userData.uid}>; rel="canonical"`);
|
||||
res.set('x-robots-tag', 'noindex');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +178,10 @@ function addTags(res, userData) {
|
||||
rel: 'canonical',
|
||||
href: userData.url || userData.uid,
|
||||
});
|
||||
res.locals.metaTags.push({
|
||||
name: 'robots',
|
||||
content: 'noindex',
|
||||
});
|
||||
}
|
||||
|
||||
if (meta.config.activitypubEnabled) {
|
||||
|
||||
Reference in New Issue
Block a user