mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #7493, adding robots noindex meta tag to compose and reset routes
This commit is contained in:
		| @@ -9,6 +9,12 @@ var topics = require('../topics'); | |||||||
| var helpers = require('./helpers'); | var helpers = require('./helpers'); | ||||||
|  |  | ||||||
| exports.get = function (req, res, callback) { | exports.get = function (req, res, callback) { | ||||||
|  | 	res.locals.metaTags = { | ||||||
|  | 		...res.locals.metaTags, | ||||||
|  | 		name: 'robots', | ||||||
|  | 		content: 'noindex', | ||||||
|  | 	}; | ||||||
|  |  | ||||||
| 	async.waterfall([ | 	async.waterfall([ | ||||||
| 		function (next) { | 		function (next) { | ||||||
| 			plugins.fireHook('filter:composer.build', { | 			plugins.fireHook('filter:composer.build', { | ||||||
|   | |||||||
| @@ -40,6 +40,12 @@ Controllers.errors = require('./errors'); | |||||||
| Controllers.composer = require('./composer'); | Controllers.composer = require('./composer'); | ||||||
|  |  | ||||||
| Controllers.reset = function (req, res, next) { | Controllers.reset = function (req, res, next) { | ||||||
|  | 	res.locals.metaTags = { | ||||||
|  | 		...res.locals.metaTags, | ||||||
|  | 		name: 'robots', | ||||||
|  | 		content: 'noindex', | ||||||
|  | 	}; | ||||||
|  |  | ||||||
| 	const renderReset = function (code, valid) { | 	const renderReset = function (code, valid) { | ||||||
| 		res.render('reset_code', { | 		res.render('reset_code', { | ||||||
| 			valid: valid, | 			valid: valid, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user