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);