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.8.3 to 0.8.5

14

index.js

@@ -38,3 +38,3 @@

return function(req, res, next) {
var protocol = req.headers['x-forwarded-proto'] || req.connection.encrypted ? 'https' : 'http';
var protocol = req.connection.encrypted || req.headers['x-forwarded-proto'] === 'https' ? 'https' : 'http';
var callNext = true;

@@ -95,6 +95,6 @@

_proxy(rule, {
protocol: protocol,
req: req,
res: res,
next: next
protocol : protocol,
req : req,
res : res,
next : next
});

@@ -198,4 +198,2 @@ callNext = false;

var opts = _getRequestOpts(metas.req, rule);
opts.protocol = metas.protocol + ':';
opts.slashes = true;
var request = httpsSyntax.test(rule.replace) ? httpsReq : httpReq;

@@ -234,3 +232,3 @@

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

@@ -237,0 +235,0 @@ if(query) {

{
"name": "connect-modrewrite",
"main": "./index.js",
"version": "0.8.3",
"version": "0.8.5",
"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