serve-static
Advanced tools
Comparing version 1.14.2 to 2.0.0-beta.1
@@ -0,1 +1,11 @@ | ||
2.0.0-beta.1 / 2022-02-05 | ||
========================= | ||
* Change `dotfiles` option default to `'ignore'` | ||
* Drop support for Node.js 0.8 | ||
* Remove `hidden` option; use `dotfiles` option instead | ||
* deps: send@1.0.0-beta.1 | ||
- Use `mime-types` for file to content type mapping | ||
- deps: debug@3.1.0 | ||
1.14.2 / 2021-12-15 | ||
@@ -2,0 +12,0 @@ =================== |
@@ -29,3 +29,2 @@ /*! | ||
module.exports = serveStatic | ||
module.exports.mime = send.mime | ||
@@ -32,0 +31,0 @@ /** |
{ | ||
"name": "serve-static", | ||
"description": "Serve static files", | ||
"version": "1.14.2", | ||
"version": "2.0.0-beta.1", | ||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
@@ -12,3 +12,3 @@ "license": "MIT", | ||
"parseurl": "~1.3.3", | ||
"send": "0.17.2" | ||
"send": "1.0.0-beta.1" | ||
}, | ||
@@ -34,3 +34,3 @@ "devDependencies": { | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">= 0.10" | ||
}, | ||
@@ -37,0 +37,0 @@ "scripts": { |
@@ -48,3 +48,3 @@ # serve-static | ||
Set how "dotfiles" are treated when encountered. A dotfile is a file | ||
Set how "dotfiles" are treated when encountered. A dotfile is a file | ||
or directory that begins with a dot ("."). Note this check is done on | ||
@@ -60,4 +60,3 @@ the path itself without checking if the path actually exists on the | ||
The default value is similar to `'ignore'`, with the exception that this | ||
default will not ignore the files within a directory that begins with a dot. | ||
The default value is `'ignore'`. | ||
@@ -220,3 +219,3 @@ ##### etag | ||
This example shows how to set a different max age depending on the served | ||
file type. In this example, HTML files are not cached, while everything else | ||
file. In this example, HTML files are not cached, while everything else | ||
is for 1 day. | ||
@@ -238,4 +237,4 @@ | ||
function setCustomCacheControl (res, path) { | ||
if (serveStatic.mime.lookup(path) === 'text/html') { | ||
function setCustomCacheControl (res, file) { | ||
if (path.extname(file) === '.html') { | ||
// Custom Cache-Control for HTML files | ||
@@ -242,0 +241,0 @@ res.setHeader('Cache-Control', 'public, max-age=0') |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
25095
171
2
257
+ Addeddebug@3.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedsend@1.0.0-beta.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removedmime@1.6.0(transitive)
- Removedsend@0.17.2(transitive)
Updatedsend@1.0.0-beta.1