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

inert

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inert - npm Package Compare versions

Comparing version 2.1.6 to 3.0.0

4

lib/file.js

@@ -191,3 +191,3 @@ // Load modules

response.bytes(range.to - range.from + 1);
response._header('content-range', 'bytes ' + range.from + '-' + range.to + '/' + length);
response.header('content-range', 'bytes ' + range.from + '-' + range.to + '/' + length);

@@ -200,3 +200,3 @@ options.start = range.from;

response._header('accept-ranges', 'bytes');
response.header('accept-ranges', 'bytes');

@@ -203,0 +203,0 @@ var fileStream = Fs.createReadStream(path, options);

@@ -5,2 +5,3 @@ // Load modules

var File = require('./file');
var Hoek = require('hoek');

@@ -10,3 +11,7 @@

var internals = {};
var internals = {
defaults: {
etagsCacheMaxSize: 1000
}
};

@@ -16,4 +21,6 @@

server.expose('_etags', server.settings.files.etagsCacheMaxSize ? new File.Etags(server.settings.files.etagsCacheMaxSize) : null);
var settings = Hoek.applyToDefaults(internals.defaults, options);
server.expose('_etags', settings.etagsCacheMaxSize ? new File.Etags(settings.etagsCacheMaxSize) : null);
server.handler('file', File.handler);

@@ -20,0 +27,0 @@ server.handler('directory', Directory.handler);

{
"name": "inert",
"description": "Static file and directory handlers plugin for hapi.js",
"version": "2.1.6",
"version": "3.0.0",
"repository": "git://github.com/hapijs/inert",

@@ -15,3 +15,3 @@ "main": "lib/index.js",

"engines": {
"node": ">=0.10.32"
"node": ">=0.10.40"
},

@@ -18,0 +18,0 @@ "dependencies": {

@@ -34,5 +34,5 @@ // Load modules

var server = new Hapi.Server({ files: { etagsCacheMaxSize: etagsCacheMaxSize }, minimal: true });
var server = new Hapi.Server({ minimal: true });
server.connection({ routes: { files: { relativeTo: relativeTo } } });
server.register(Inert, Hoek.ignore);
server.register(etagsCacheMaxSize !== undefined ? { register: Inert, options: { etagsCacheMaxSize: etagsCacheMaxSize } } : Inert, Hoek.ignore);
return server;

@@ -39,0 +39,0 @@ };

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