1.1.2 • Published 6 years ago

norobot v1.1.2

Weekly downloads
101
License
MIT
Repository
github
Last release
6 years ago

norobot

Connect/Express middleware that sets X-Robots-Tag header to no-index, no-follow. Useful to avoid indexing of non production environments.

Install

$ npm install norobot

Use

const express = require('express')
const norobot = require('norobot')

const app = express()

// Enable X-Robots-Tag for all routes, if not in production
app.use(norobot('production' !== process.env.NODE_ENV))

// Disable X-Robots-Tag for a route
app.get('/', norobot, (request, response, next) => {
  response.send('Hello World!')
})

License

The MIT License

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

9 years ago