Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
check-referrer
Advanced tools
Readme
middleware for routing requests based on referrer
npm install check-referrer
###checkReferrer
Params:
rules String
list of routing rules
redirect String
route for redirect
req.fromAllowedReferrer will be set to true for whitelisted referrers
By default, all requests are redirected.
To exclude urls from redirection use '-'
// Whitelist requests from example.com
var checkReferrer = require('check-referrer');
app.use(checkReferrer('-example.com'));
// req.fromAllowedReferrer will be set to true in all middleware that runs after a request from example.com
// Only allow and whitelist requests from example.com
var checkReferrer = require('check-referrer');
app.use(checkReferrer('-example.com', '/redirect-here'));
To redirect only specific urls while allowing all others, use '+'
// Only redirect requests from example.com
var checkReferrer = require('check-referrer');
app.use(checkReferrer('+example.com', '/redirect-here'));
Seperate rules with a comma
// Only allow requests from certain domains
var checkReferrer = require('check-referrer');
app.use(checkReferrer('-example.com,-mysite.com,-othersite.com', '/redirect-here'));
The rule doesn't have to be a url
// Only allow visitors with a secret referrer key
var checkReferrer = require('check-referrer');
app.use(checkReferrer('-my_secret_key', '/redirect-here'));
This is "security" by obscurity, similar to passwords. If somone knows your password, then its useless. Likewise, if the visitor knows which referrers are allowed, they can easily spoof their referrer.
FAQs
middleware for routing requests based on referrer
The npm package check-referrer receives a total of 9 weekly downloads. As such, check-referrer popularity was classified as not popular.
We found that check-referrer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.