static-server
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -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 @@ ; |
{ | ||
"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(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
657
80
2
28757
14