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

create-server

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-server - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

23

index.js

@@ -96,2 +96,25 @@ 'use strict';

//
// Setup an addition redirect server which redirects people to the correct
// HTTP or HTTPS server.
//
if (+options.redirect) require('http').createServer(function handle(req, res) {
res.statusCode = 404;
if (req.headers.host) {
res.statusCode = 301;
res.setHeader(
'Location',
'http'+ (secure ? 's' : '') +'://'+ req.headers.host + req.url
);
}
if (secure) res.setHeader(
'Strict-Transport-Security',
'max-age=8640000; includeSubDomains'
);
res.end('');
}).listen(+options.redirect);
//
// Assign the last callbacks.

@@ -98,0 +121,0 @@ //

4

package.json
{
"name": "create-server",
"version": "0.0.0",
"version": "0.0.1",
"description": "Create a pre-configured HTTP server",

@@ -30,4 +30,4 @@ "main": "index.js",

"dependencies": {
"connected": "0.0.0"
"connected": "0.0.1"
}
}
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