mirror of
				https://github.com/Xahau/Validation-Ledger-Tx-Store-to-xPOP.git
				synced 2025-11-04 12:25:48 +00:00 
			
		
		
		
	Add robots txt & noindex
This commit is contained in:
		@@ -84,9 +84,17 @@ if (!wss) {
 | 
			
		||||
 | 
			
		||||
      wss = expressWs(app)
 | 
			
		||||
 | 
			
		||||
      // app.use(function middlware (req, res, next) {
 | 
			
		||||
      //   return next()
 | 
			
		||||
      // })
 | 
			
		||||
      app.use(function middlware (req, res, next) {
 | 
			
		||||
        res.setHeader('X-Robots-Tag', 'noindex')
 | 
			
		||||
        return next()
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      app.use('/robots.txt', (req, res, next) => {
 | 
			
		||||
        res.setHeader('content-type', 'text/plain')
 | 
			
		||||
        return res.send(
 | 
			
		||||
          `User-agent: *\nDisallow: /\n`
 | 
			
		||||
        )
 | 
			
		||||
      })
 | 
			
		||||
 | 
			
		||||
      app.use('/',
 | 
			
		||||
        (req, res, next) => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user