Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
koa-location-filter
Advanced tools
koa middleware filtering requests depenging on user's location
Middleware for Koa realizing filtering via user's location.
Install with npm
$ npm install koa-location-filter --save
This module works detects the location of client by requests to following providers:
You can to make list of countries access is denied from. The can be added into the list by code. List of countrues and their codes: geonames
For each country you can specify the reponse message. Response will be with code status 404.
var Koa = require('koa');
var app = new Koa();
var filter = require('koa-location-filter');
filter(app, {
blackList: {
RU: 'Вам запрещён доступ',
BG: 'Ne moze bee',
US: 'Access is denied'
}
});
app.use(async (ctx, next) => {
ctx.body = 'Success';
});
var port = 8000;
app.listen(port, ()=> {
console.log('Сервер работает на порту ' + port);
});
FAQs
koa middleware filtering requests depenging on user's location
We found that koa-location-filter 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.