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 - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

10

index.js

@@ -7,7 +7,7 @@ const path = require('path')

await loadIps()
})()
module.exports = (req, res, next) => {
res.locals.isGoogleCrawler = isIpfromGoogle(req.ip)
next()
}
})()
module.exports = (req, res, next) => {
res.locals.isGoogleCrawler = isIpfromGoogle(req.ip)
next()
}
{
"name": "express-is-googlecrawler",
"version": "1.0.3",
"version": "1.0.4",
"description": "Express middleware that informs if request originates from a Google Bot or a Google Crawler",

@@ -29,2 +29,3 @@ "main": "index.js",

"expect.js": "^0.3.1",
"express": "^4.19.2",
"mocha": "^10.4.0",

@@ -31,0 +32,0 @@ "standard": "^17.1.0"

@@ -5,4 +5,14 @@ /* global describe, it, before */

const expect = require('expect.js')
const express = require('express')
const expressIsGoogleCrawler = require(path.join(__dirname, '..', 'index.js'))
const { loadIps, isIpfromGoogle } = require(path.join(__dirname, '..', 'main.js'))
describe('express', function () {
it('Middleware is correctly passed', async () => {
const app = express()
app.use(expressIsGoogleCrawler)
})
})
describe('Google bots/crawlers IPs', async function () {

@@ -9,0 +19,0 @@ before(async () => {

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