Socket
Socket
Sign inDemoInstall

sirv

Package Overview
Dependencies
3
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.16 to 1.0.17

7

build.js

@@ -158,2 +158,3 @@ const fs = require('fs');

let extns = [''];
let pathname = parse(req).pathname;
let val = req.headers['accept-encoding'] || '';

@@ -164,3 +165,7 @@ if (gzips && val.includes('gzip')) extns.unshift(...gzips);

let pathname = typeof req._decoded === 'string' ? req._decoded : parse(req, true).pathname;
if (pathname.indexOf('%') !== -1) {
try { pathname = decodeURIComponent(pathname) }
catch (err) { /* malform uri */ }
}
let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns);

@@ -167,0 +172,0 @@ if (!data) return next ? next() : isNotFound(req, res);

4

package.json
{
"name": "sirv",
"version": "1.0.16",
"version": "1.0.17",
"description": "The optimized & lightweight middleware for serving requests to static assets",

@@ -23,3 +23,3 @@ "repository": "lukeed/sirv",

"dependencies": {
"@polka/url": "^1.0.0-next.19",
"@polka/url": "^1.0.0-next.20",
"mime": "^2.3.1",

@@ -26,0 +26,0 @@ "totalist": "^1.0.0"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc