Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-is-googlecrawler

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-is-googlecrawler

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

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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)

Keywords

FAQs

Package last updated on 12 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc