
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@abcnews/mostess
Advanced tools
The hostess.
A quick 'n dirty HTTP server that serves up a configurable mix of dev & production resources. Use this to swap in local resources while browsing a production site, or redirect resources to a local dev server.
This runs on port 80 and thus needs to be run as root. To set up:
sudo node ./index.js -c <config.js>
/etc/hosts
file to point the remote server to localhostThe hosts file should look as follows:
0.0.0.0 www.example.org
The server will continue to run until you kill it manually.
Config is managed as a Javascript module. The following values are supported:
["/", "/home/me/www/"]
{"v1.0.0": "v1.0.1"}
An example config follows:
module.exports = {
searchandreplace: [
// Point the remote foo to the local bar
['foo.js', 'bar.js'],
],
redirect: [
// Redirect assets to another server
// foo.css or bar.css will be redirected to the server on localhost:8000
[ /.*((foo|bar).css)$/, 'http://localhost:8000/$1' ],
],
paths: [
// Redirect this path to the local build folder
[
/^\/remote\/path\/v1.0.0/,
'build/',
],
// Use regexes to redirect multiple remotes to the local path
[
/^\/remote\/path\/[^/]+/,
'build/',
],
],
ssl: {
key: "path/to/key",
cert: "path/to/cert",
passphrase: "my passphrase (optional)"
}
};
SSL is useful if you're testing a site that uses SSL. SSL on port 443 is enabled through the SSL options on the command line, or by specifying SSL options in the config file.
Eg.
node index.js --key='serv.key' --cert='server.cert'
To generate your own SSL certificate:
openssl req -nodes -new -x509 -keyout server.key -out server.cert
This is a development server. It is not intended to be run on the open Internet or without a firewall in place. Take appropriate precautions.
FAQs
Proxy to serve local assets.
We found that @abcnews/mostess demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.