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

koa-static-cache

Package Overview
Dependencies
Maintainers
9
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-static-cache - npm Package Compare versions

Comparing version 5.1.2 to 5.1.3

6

HISTORY.md
5.1.3 / 2020-04-29
==================
**fixes**
* [[`dca1edf`](http://github.com/koajs/static-cache/commit/dca1edf0b641993921b33c0289dbd73ff4bc1c13)] - fix: alias should work when preload = false (#84) (TZ | 天猪 <<atian25@qq.com>>)
5.1.2 / 2018-02-06

@@ -3,0 +9,0 @@ ==================

17

index.js

@@ -37,14 +37,2 @@ var crypto = require('crypto')

if (options.alias) {
Object.keys(options.alias).forEach(function (key) {
var value = options.alias[key]
if (files.get(value)) {
files.set(key, files.get(value))
debug('aliasing ' + value + ' as ' + key)
}
})
}
return async (ctx, next) => {

@@ -59,4 +47,7 @@ // only accept HEAD and GET

var filename = path.normalize(safeDecodeURIComponent(ctx.path))
// check alias
if (options.alias && options.alias[filename]) filename = options.alias[filename];
var file = files.get(filename)
// try to load file

@@ -63,0 +54,0 @@ if (!file) {

{
"name": "koa-static-cache",
"description": "Static cache for koa",
"version": "5.1.2",
"version": "5.1.3",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",

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