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

ecstatic

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecstatic - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

23

lib/ecstatic/opts.js

@@ -8,2 +8,3 @@ // This is so you can have options aliasing and defaults in one place.

cache = 'max-age=3600',
gzip = false,
defaultExt;

@@ -42,9 +43,14 @@

if (opts.cache !== undefined) {
if (typeof opts.cache === 'string') {
cache = opts.cache
} else if(typeof opts.cache === 'number') {
cache = 'max-age=' + opts.cache;
}
}
if (opts.cache !== undefined) {
if (typeof opts.cache === 'string') {
cache = opts.cache
}
else if(typeof opts.cache === 'number') {
cache = 'max-age=' + opts.cache;
}
}
if (typeof opts.gzip !== undefined && opts.gzip !== null) {
gzip = opts.gzip;
}
}

@@ -57,4 +63,5 @@

defaultExt: defaultExt,
baseDir: (opts && opts.baseDir) || '/'
baseDir: (opts && opts.baseDir) || '/',
gzip: gzip
}
}

@@ -113,3 +113,3 @@ var ecstatic = require('../ecstatic'),

dirs.sort(function (a, b) { return b[0] - a[0] }).forEach(writeRow);
files.sort(function (a, b) { return b[0] - a[0] }).forEach(writeRow);
files.sort(function (a, b) { return b.toString().localeCompare(a.toString()) }).forEach(writeRow);

@@ -121,3 +121,3 @@ html += '</table>\n';

+ ' server running @ '
+ ent.encode(req.headers.host) + '</address>\n'
+ ent.encode(req.headers.host || '') + '</address>\n'
+ '</body></html>'

@@ -124,0 +124,0 @@ ;

@@ -5,3 +5,3 @@ {

"description": "A simple static file server middleware that works with both Express and Flatiron",
"version": "0.4.2",
"version": "0.4.3",
"homepage": "https://github.com/jesusabdullah/node-ecstatic",

@@ -8,0 +8,0 @@ "repository": {

@@ -102,3 +102,3 @@ # Ecstatic [![build status](https://secure.travis-ci.org/jesusabdullah/node-ecstatic.png)](http://travis-ci.org/jesusabdullah/node-ecstatic)

Serve `/path/index.html` when `/path/` is requested.
Turn **off** autoIndexing with `opts.autoIndex === true`. Defaults to **true**.
Turn **off** autoIndexing with `opts.autoIndex === false`. Defaults to **true**.

@@ -105,0 +105,0 @@ ### `opts.defaultExt`

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