Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Mar 3, 2014
1 parent cdc3e53 commit 8f941f2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ var app = koa();
koa.use(gzip());
```

### gzip always be the last middleware

If you using other response middlewares, like [etag](https://github.com/koajs/etag), just use `gzip` be the first.

```js
app.use(gzip());
app.use(fresh());
app.use(etag());

client => request => gzip() => fresh() => etag() => logic codes
||
client <= gzip() <= fresh() <= etag() <= response
```

## License

(The MIT License)
Expand Down

0 comments on commit 8f941f2

Please sign in to comment.