Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
remote-http-middleware
Advanced tools
Webpack dev server middleware for requiring http an address and inject bundle.js
This project is a webpack-dev-server
middleware that inject bundle.js
(or other configurable paths) in a remote page locally
.
If you have a local server that render a jinja2 template
(or other template rendering) running on port 3001
, you can inject bundle.js
in any
page served by this address for development purposes and use webpack
with livereload
.
Ex:
$ curl 'http://localhost:3001/hello-world'
<html>
<body>Hello world</body>
</html>
After install this project on your webpack-dev-server
running locally on port 3000
:
Ex:
$ curl 'http://localhost:3001/real-server/http://localhost:3001/hello-world'
<html>
<body>
Hello world
<script type="text/javascript" src="/static/js/bundle.js"></script>
</body>
</html>
Install with npm
:
$ npm install remote-http-middleware
So, on your webpackDevServer.config.js
you need to install on your app
using app.use()
like:
const HtmlWebpackPlugin = require('html-webpack-plugin');
const remoteHTTPMiddleware = require('remote-http-middleware');
...
module.exports = function (proxy, allowedHost) {
return {
...
before(app) {
...
app.use(remoteHTTPMiddleware({
plugins: config.plugins,
HtmlWebpackPlugin: HtmlWebpackPlugin,
assets: {
manifest: false,
js: [`${config.output.publicPath || ""}${config.output.filename}`],
css: [],
}
}));
},
};
};
FAQs
Webpack dev server middleware for requiring http an address and inject bundle.js
The npm package remote-http-middleware receives a total of 0 weekly downloads. As such, remote-http-middleware popularity was classified as not popular.
We found that remote-http-middleware 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.