Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-modrewrite

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-modrewrite - npm Package Compare versions

Comparing version 0.6.2-pre to 0.6.3-pre

example/index.html

4

example/app.js

@@ -12,4 +12,6 @@

app.use(modRewrite([
'/proxy/(.*) http://nodejs.org/$1 [P]'
'/proxy/(.*) http://nodejs.org/$1 [P]',
'!\\.\\w+$ /index.html'
]));
app.use(express.static(__dirname));
});

@@ -16,0 +18,0 @@

@@ -157,4 +157,7 @@

var pipe = request(opts, function (res) {
pipe._headers.via = opts.headers.via;
res.headers.via = opts.headers.via;
metas.res.writeHead(res.statusCode, res.headers);
res.on('error', function (err) {
metas.next(err);
});
res.pipe(metas.res);

@@ -167,3 +170,7 @@ });

pipe.end();
if(!metas.req.readable) {
pipe.end();
} else {
metas.req.pipe(pipe);
}
}

@@ -181,3 +188,3 @@

function _getRequestOpts(req, rule) {
var opts = url.parse(req.url.replace(rule.regexp, rule.replace))
var opts = url.parse(req.url.replace(rule.regexp, rule.replace), true)
, query = (opts.search != null) ? opts.search : '';

@@ -196,3 +203,5 @@

delete opts.headers['host'];
return opts;
}
{
"name": "connect-modrewrite",
"main": "./index.js",
"version": "0.6.2-pre",
"version": "0.6.3-pre",
"description": "connect-modrewrite adds modrewrite functionality to connect/express server",

@@ -6,0 +6,0 @@ "author": {

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