Socket
Socket
Sign inDemoInstall

webpack-hot-middleware

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-hot-middleware - npm Package Compare versions

Comparing version 2.22.2 to 2.22.3

16

middleware.js

@@ -60,12 +60,20 @@ module.exports = webpackHotMiddleware;

handler: function(req, res) {
req.socket.setKeepAlive(true);
res.writeHead(200, {
var headers = {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'text/event-stream;charset=utf-8',
'Cache-Control': 'no-cache, no-transform',
'Connection': 'keep-alive',
// While behind nginx, event stream should not be buffered:
// http://nginx.org/docs/http/ngx_http_proxy_module.html#proxy_buffering
'X-Accel-Buffering': 'no'
});
};
var isHttp1 = !(parseInt(req.httpVersion) >= 2);
if (isHttp1) {
req.socket.setKeepAlive(true);
Object.assign(headers, {
'Connection': 'keep-alive',
});
}
res.writeHead(200, headers);
res.write('\n');

@@ -72,0 +80,0 @@ var id = clientId++;

{
"name": "webpack-hot-middleware",
"version": "2.22.2",
"version": "2.22.3",
"description": "Webpack hot reloading you can attach to your own server",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc