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

static-server

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

static-server - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

2

bin/static-server.js

@@ -8,2 +8,3 @@ #!/usr/bin/env node

const DEFAULT_ERROR_404 = undefined;
const DEFAULT_CORS = undefined;

@@ -33,2 +34,3 @@

.option('-n, --not-found <filename>', 'the file not found template', addNotFoundTemplate, DEFAULT_ERROR_404)
.option('-c, --cors <pattern>', 'Cross Origin Pattern. Use "*" to allow all origins', DEFAULT_CORS)
.parse(process.argv);

@@ -35,0 +37,0 @@ ;

7

package.json
{
"name": "static-server",
"description": "A simple http server to serve static resource files from a local directory.",
"version": "2.0.5",
"version": "2.0.6",
"author": "Eduardo Bohrer <nbluisrs@gmail.com>",

@@ -34,3 +34,6 @@ "keywords": [

},
"license": "MIT",
"license": {
"type": "MIT",
"url": "http://creativecommons.org/licenses/MIT/"
},
"devDependencies": {

@@ -37,0 +40,0 @@ "istanbul": "^0.3.0",

@@ -21,2 +21,3 @@ [![Build Status](https://secure.travis-ci.org/nbluis/static-server.svg?branch=master)](http://travis-ci.org/nbluis/static-server)

-n, --not-found <filename> the error 404 file
-c, --cors <pattern> Cross Origin Pattern. Use "*" to allow all origins

@@ -36,3 +37,3 @@ ## Using as a node module

host: '10.0.0.100', // optional, defaults to any interface
cors: '*' // optional, defaults to undefined
cors: '*', // optional, defaults to undefined
followSymlink: true, // optional, defaults to a 404 error

@@ -39,0 +40,0 @@ templates: {

@@ -131,3 +131,3 @@

return function handler(req, res) {
var uri = req.path = url.parse(req.url).pathname;
var uri = req.path = decodeURIComponent(url.parse(req.url).pathname);
var filename = path.join(server.rootPath, uri);

@@ -134,0 +134,0 @@ var timestamp = process.hrtime();

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