Comparing version 12.0.0 to 12.0.1
@@ -97,7 +97,9 @@ #!/usr/bin/env node | ||
-S, --symlinks Resolve symlinks instead of showing 404 errors | ||
--ssl-cert Optional path to an SSL/TLS certificate to serve with HTTPS | ||
--ssl-key Optional path to the SSL/TLS certificate\'s private key | ||
--ssl-cert Optional path to an SSL/TLS certificate to serve with HTTPS | ||
--ssl-pass Optional path to the SSL/TLS certificate\'s passphrase | ||
--ssl-key Optional path to the SSL/TLS certificate\'s private key | ||
--no-port-switching Do not open a port other than the one specified when it\'s taken. | ||
@@ -204,6 +206,9 @@ | ||
const sslPass = args['--ssl-pass']; | ||
const server = httpMode === 'https' | ||
? https.createServer({ | ||
key: fs.readFileSync(args['--ssl-key']), | ||
cert: fs.readFileSync(args['--ssl-cert']) | ||
cert: fs.readFileSync(args['--ssl-cert']), | ||
passphrase: sslPass ? fs.readFileSync(sslPass) : '' | ||
}, serverHandler) | ||
@@ -236,3 +241,3 @@ : http.createServer(serverHandler); | ||
localAddress = `${httpMode}://${address}:${details.port}`; | ||
networkAddress = networkAddress ? `${httpMode}://${ip}:${details.port}` : null; | ||
networkAddress = ip ? `${httpMode}://${ip}:${details.port}` : null; | ||
} | ||
@@ -385,2 +390,3 @@ | ||
'--ssl-key': String, | ||
'--ssl-pass': String, | ||
'-h': '--help', | ||
@@ -387,0 +393,0 @@ '-v': '--version', |
{ | ||
"name": "serve", | ||
"version": "12.0.0", | ||
"version": "12.0.1", | ||
"description": "Static file serving and directory listing", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17697
358
2