Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
escapist-middleware
Advanced tools
Making trapdoors for secret files since 1748.
Note: This project is in early development, and versioning is a little different. Read this for more details.
So you are serving a static site. You know, the usual. But you've got some files in your project you don't want to be publicly available. At the same time you don't want to have to remove them from your project. Escapist to the rescue!
npm install escapist-middleware
Escapist is pretty easy to use. You can feed it a string or array of string with paths to the files you'd like to prevent from being served. You can even use globstars, a la minimatch! Quick example:
var http = require('http'),
connect = require('connect'),
escapist = require('escapist-middleware');
var app = connect()
.use(escapist('path/to/secret.txt'))
.use(connect.static('public'));
http.createServer(app).listen(1111);
Also, as noted, you can pass an array of string and use globstars, like this:
escapist(['**/keys/id_rsa', 'plaintext_passwords/*'])
Note: We do not endorse keeping ssh private keys and/or plaintext passwords in your repos.
Escapist does not actually serve files, so it's not a standalone solution. It should be used as part of a larger stack. For an example of an awesome static stack, check out charge.
FAQs
Ignore certain files so they are not served
The npm package escapist-middleware receives a total of 11 weekly downloads. As such, escapist-middleware popularity was classified as not popular.
We found that escapist-middleware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.