New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

forcedomain

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forcedomain - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

dist/forceDomain.js

@@ -15,3 +15,2 @@ 'use strict';

var statusCode = newRoute.type === 'temporary' ? 307 : 301;
res.writeHead(statusCode, {

@@ -18,0 +17,0 @@ Location: newRoute.url

8

dist/redirect.js

@@ -12,3 +12,2 @@ 'use strict';

});
var hostHeaderParts = (hostHeader || '').split(':');

@@ -22,8 +21,9 @@ var hostname = hostHeaderParts[0] || '';

}
/* eslint-disable prefer-template */
/* eslint-disable prefer-template */
var route = targetProtocol + '://' + hostname + (port ? ':' + port : '') + url;
var route = "".concat(targetProtocol, "://").concat(hostname).concat(port ? ':' + port : '').concat(url);
/* eslint-enable prefer-template */
var rewrittenRoute = rewrite(route, options);
return {

@@ -30,0 +30,0 @@ type: options.type,

@@ -12,5 +12,3 @@ 'use strict';

}, options);
var parsedRoute = url.parse(route);
parsedRoute.host = undefined;

@@ -21,5 +19,7 @@

}
if (options.hostname) {
parsedRoute.hostname = options.hostname;
}
if (options.port) {

@@ -26,0 +26,0 @@ parsedRoute.port = options.port;

{
"name": "forcedomain",
"version": "1.0.0",
"version": "1.0.1",
"description": "forcedomain is a middleware for Connect and Express that redirects any requests to a default domain.",

@@ -49,10 +49,10 @@ "contributors": [

"dependencies": {
"lodash": "4.17.10"
"lodash": "4.17.11"
},
"devDependencies": {
"assertthat": "1.0.0",
"assertthat": "2.0.1",
"cases": "1.0.0",
"express": "4.16.3",
"roboter": "1.0.3",
"supertest": "3.0.0"
"express": "4.16.4",
"roboter": "3.0.4",
"supertest": "3.4.2"
},

@@ -59,0 +59,0 @@ "repository": {

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