From af3904eabd86ee63d589b9eb14f4421809a8e62f Mon Sep 17 00:00:00 2001 From: vicanso Date: Mon, 26 Sep 2016 21:44:43 +0800 Subject: [PATCH] change `extname` default value --- lib/serve.js | 1 - package.json | 2 +- test/serve.js | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/serve.js b/lib/serve.js index acde5a7..b155604 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -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)) { diff --git a/package.json b/package.json index 9d3cacc..84c81f1 100644 --- a/package.json +++ b/package.json @@ -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 ", "keywords": [ "koa", diff --git a/test/serve.js b/test/serve.js index 2bcbcf5..3740ad7 100644 --- a/test/serve.js +++ b/test/serve.js @@ -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);