New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

express-spam-referral-blocker

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-spam-referral-blocker

Express middleware that blocks referral spam, and sends a 404.


Version published
Maintainers
2
Created

express-spam-referral-blocker Build Status

Express middleware that blocks referral spam, and sends a 404.

Usage

install

npm install express-spam-referral-blocker --save

use middleware

var spamBlocker = require('express-spam-referral-blocker');
app.use(spamBlocker.send404);

Advanced Usage

Replace list of referals to block

spamBlocker.setReferrers(['google.com', 'yahoo.com']);

Add to list of referals to block

spamBlocker.addToReferrers(['google.com', 'yahoo.com']);

Spammers list

Uses community-contributed list of referrer spammers maintained by Piwik, and allows to use custom list as addition to it.

Contribute

Update and add tests to tests/**/*.spec.js
Pull requests will verify that tests pass

FAQs

Package last updated on 22 Dec 2015

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