![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
web-app-runner
Advanced tools
Readme
A simple HTTP server targeted for single-page web applications.
Simple HTTP server that implements middleware for banning or re-routing authorized connections based on ip, agent or other requiest attributes. The server can be used stand alone or as middleware for connect or express.
npm install web-app-runner --save
There are various levels of authentication that can be applied ranging from completely open to finely filtered. The very basic server can be launched in a few lines of code while more robust applications include loggers, white/black list files, configuration files, etc.
// by default the server returns public/index.html
var runner = require('web-app-runner').createInstance();
runner.start();
var configFile = __dirname + '/config.json',
logfile = process.env.HOME + '/logs/web-app.log',
log = require('simple-node-logger').createRollingFileLogger( logfile ),
opts = {
log:log,
env:'production',
port:18004,
home:'./',
whiteListFile:__dirname + '/whitelist.json',
blackListFile:__dirname + '/blacklist.json',
runAsDaemon:true,
clustered:true
},
runner = require('web-app-runner').createInstance( opts );
runner.start();
The following IP Filter server with accept and reject specific IP addresses. All unknown IPs are accepted. This is modified with the acceptUnknownVisitor option parameter set to false.
IP filters work on lists of regular expressions for accepting and rejecting specific addresses or address ranges. The process first checks the white list and allows access if there is a match. If the white list is not matched, then the black list is checked. When a black list match is detected the user is sent to the specified reject URL.
The process first checks the white list, then the black list.
var opts = {
ip:{
whiteList:[
'127.0.0.1',
'173.13.151.[1-127]'
],
blackList:[
'193.144.151.180'
],
acceptUnkownVisitor:true
}
},
runner = require('web-app-runner').createInstance( opts );
runner.start();
Or better yet, define the white and black lists in files and set the refresh rate. This way, the lists are refreshed when the lists change.
Agent filters work on lists of regular expressions. The process first checks the white list and allows access if there is a match. If the white list is not matched, then the black list is checked. When a black list match is detected the user is sent to the specified reject URL.
var opts = {
agent:{
whiteList:[
'chrome/[23][0-9]',
'msie 1[0-1]',
'safari/[7-8]',
'safari/534'
],
blackList:[
'msie [2-9]',
'safari/[2-5]
'chrome/2[0-6]'
'chrome/1[0-9]'
],
acceptUnkownAgent:true,
rejectURL:'/browser-not-supported.html'
}
},
runner = require('web-app-runner').createInstance( opts );
runner.start();
Tests are in place for all implemented methods. Tests are written in mocha/chai/should and include jshint rules. To run the tests, do this:
make test
Copyright © 2014, rain city software | Version 0.90.17
FAQs
A simple HTTP application server that accepts or rejects connections based on authenticated attributes including ip, user agent, etc. The server can be used stand alone or as middleware for connect or express.
The npm package web-app-runner receives a total of 3 weekly downloads. As such, web-app-runner popularity was classified as not popular.
We found that web-app-runner 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.