1.1.2 • Published 6 months ago

express-is-googlecrawler v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

express-is-googlecrawler

Very fast Express middleware that informs if request originates from a Google Bot or a Google Crawler.

Instead of making a new DNS request for every incoming request or checking the HTTP Header User-Agent which is not reliable, this middleware stores in-memory all known IP ranges coming from Google bots and crawlers, for very fast middleware processing.

Install

npm i express-is-googlecrawler

Usage

const express = require('express')
const isGoogleCrawler = require('express-is-googlecrawler')

const app = express()
app.use(isGoogleCrawler)

app.get('/', (req, res) => {
  res.send(res.locals.isGoogleCrawler) // Boolean
})

app.listen(3000)
1.1.1

6 months ago

1.1.0

6 months ago

1.0.6

6 months ago

1.1.2

6 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago