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 3.0.3 to 3.1.0

5

HISTORY.md
3.1.0 / 2015-03-28
==================
* Merge pull request #33 from AlexeyKhristov/gz
3.0.3 / 2015-03-28

@@ -3,0 +8,0 @@ ==================

8

index.js

@@ -115,3 +115,9 @@ var crypto = require('crypto')

if (shouldGzip) {
file.zipBuffer = yield gzip(file.buffer)
var gzFile = files[filename + '.gz'];
if (options.usePrecompiledGzip && gzFile && gzFile.buffer) { // if .gz file already read from disk
file.zipBuffer = gzFile.buffer
} else {
file.zipBuffer = yield gzip(file.buffer)
}
this.set('Content-Encoding', 'gzip')

@@ -118,0 +124,0 @@ this.body = file.zipBuffer

2

package.json
{
"name": "koa-static-cache",
"description": "Static cache for koa",
"version": "3.0.3",
"version": "3.1.0",
"author": {

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

@@ -25,2 +25,3 @@ # Koa Static Cache

- Uses MD5 hash sum as an ETag.
- Uses .gz files if present on disk, like nginx gzip_static module

@@ -52,2 +53,3 @@ ## Installation

- `options.gzip` (bool) - when request's accept-encoding include gzip, files will compressed by gzip.
- `options.usePrecompiledGzip` (bool) - try use gzip files, loaded from disk, like nginx gzip_static
- `options.alias` (obj) - object map of aliases. See below.

@@ -54,0 +56,0 @@ - `options.prefix` (str) - the url prefix you wish to add, default to `''`.

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