From 6415ba82c43efce532239dbe745abc93f339576c Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 27 Mar 2019 17:10:56 -0400 Subject: [PATCH] fix: #7493, adding robots noindex meta tag to compose and reset routes --- src/controllers/composer.js | 6 ++++++ src/controllers/index.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/controllers/composer.js b/src/controllers/composer.js index 7bd61a5bb2..880e1b2b78 100644 --- a/src/controllers/composer.js +++ b/src/controllers/composer.js @@ -9,6 +9,12 @@ var topics = require('../topics'); var helpers = require('./helpers'); exports.get = function (req, res, callback) { + res.locals.metaTags = { + ...res.locals.metaTags, + name: 'robots', + content: 'noindex', + }; + async.waterfall([ function (next) { plugins.fireHook('filter:composer.build', { diff --git a/src/controllers/index.js b/src/controllers/index.js index f4d082067a..3e54e6f98d 100644 --- a/src/controllers/index.js +++ b/src/controllers/index.js @@ -40,6 +40,12 @@ Controllers.errors = require('./errors'); Controllers.composer = require('./composer'); Controllers.reset = function (req, res, next) { + res.locals.metaTags = { + ...res.locals.metaTags, + name: 'robots', + content: 'noindex', + }; + const renderReset = function (code, valid) { res.render('reset_code', { valid: valid,