cache-control extension example

This commit is contained in:
Lloyd Brookes
2016-05-30 13:48:45 +01:00
parent 1c57d29b3f
commit 6a2bbafd08
4 changed files with 20 additions and 13 deletions

View File

@ -117,13 +117,6 @@ function localWebServer (options) {
middlewareStack.push(etag())
}
/* cache-control headers */
if (options.cacheControl) {
const cacheControl = require('koa-cache-control')
debug('Cache control', JSON.stringify(options.cacheControl))
app.use(cacheControl(options.cacheControl))
}
/* mime-type overrides */
if (options.mime) {
debug('mime override', JSON.stringify(options.mime))