Skip to content

Commit

Permalink
change extname default value
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Sep 26, 2016
1 parent 4c5016a commit af3904e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function serve(staticPath, options) {
const opts = Object.assign({
etag: true,
lastModified: true,
extname: ['.html', '.htm'],
}, options);
debug('static path:%s, opts:%j', staticPath, opts);
if (options && (options.disableETag || options.disableLastModified)) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "koa-static-serve",
"description": "static serve middlware for koa",
"version": "2.1.1",
"version": "2.1.2",
"author": "Tree Xie <vicansocanbico@gmail.com>",
"keywords": [
"koa",
Expand Down
4 changes: 3 additions & 1 deletion test/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ describe('serve', function() {
it('should add default ext successful', done => {
const app = new Koa();

app.use(serve(assets));
app.use(serve(assets, {
extname: ['.html'],
}));
request(app.listen())
.get('/index')
.expect(200, done);
Expand Down

0 comments on commit af3904e

Please sign in to comment.