express-is-googlecrawler
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "express-is-googlecrawler", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Express middleware that informs if request originates from a Google Bot or a Google Crawler", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "standard && mocha" | ||
}, | ||
@@ -23,3 +23,11 @@ "repository": { | ||
}, | ||
"homepage": "https://github.com/jfoclpf/express-is-googlecrawler#readme" | ||
"homepage": "https://github.com/jfoclpf/express-is-googlecrawler#readme", | ||
"dependencies": { | ||
"axios": "^1.7.2" | ||
}, | ||
"devDependencies": { | ||
"expect.js": "^0.3.1", | ||
"mocha": "^10.4.0", | ||
"standard": "^17.1.0" | ||
} | ||
} |
# express-is-googlecrawler | ||
Very fast Express middleware that informs if request originates from a Googlebot. | ||
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, it stores in-memory all [IP ranges coming from Google bots and crawlers](https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot), for very fast middleware processing. | ||
Instead of making a new DNS request for every incoming request, it stores in-memory all known [IP ranges coming from Google bots and crawlers](https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot), for very fast middleware processing. | ||
@@ -13,3 +13,17 @@ ## Install | ||
## Usage | ||
```js | ||
const express = require('express') | ||
const expressIsGoogleCrawler = require('express-is-googlecrawler') | ||
const app = express() | ||
app.use(expressIsGoogleCrawler) | ||
app.get('/', (req, res) => { | ||
res.send(res.locals.isGoogleCrawler) // Boolean | ||
}) | ||
app.listen(3000) | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
6141
6
96
0
29
0
1
3
2
+ Addedaxios@^1.7.2
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.9(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedproxy-from-env@1.1.0(transitive)