@ -46,7 +46,8 @@ localWebServer({
mime: options.cli.server.mime,
blacklist: options.cli.server.blacklist.map(regexp => RegExp(regexp, "i")),
proxyRoutes: options.cli.server.proxyRoutes,
spa: options.cli.server.spa
spa: options.cli.server.spa,
'no-cache': options.cli.server['no-cache']
}).listen(options.cli.server.port, onServerUp)
function halt (message) {
@ -17,6 +17,10 @@ module.exports = {
description: 'Enable gzip compression, reduces bandwidth.', group: 'server'
},
{
name: 'no-cache', alias: 'n', type: Boolean,
description: 'Disable etag-based caching.', group: 'server'
name: 'help', alias: 'h', type: Boolean,
description: 'Print these usage instructions', group: 'misc'
@ -83,8 +83,11 @@ function getApp (options) {
})
}
app.use(conditional())
app.use(etag())
/* Cache */
if (!options['no-cache']) {
/* mime-type overrides */
if (options.mime) {