Add switch for GZIP Content-Encoding

This commit is contained in:
Béla Varga
2016-04-14 19:56:00 +02:00
parent b9b32eaad8
commit 42bb9cb3a4
6 changed files with 92 additions and 4 deletions

View File

@ -41,6 +41,10 @@ module.exports = function () {
alias: 'nc',
description: 'Disable Cross-Origin Resource Sharing'
},
'no-gzip': {
alias: 'ng',
description: 'Disable GZIP Content-Encoding'
},
snapshots: {
alias: 'S',
description: 'Set snapshots directory',
@ -69,6 +73,7 @@ module.exports = function () {
.boolean('read-only')
.boolean('quiet')
.boolean('no-cors')
.boolean('no-gzip')
.help('help').alias('help', 'h')
.version(pkg.version).alias('version', 'v')
.example('$0 db.json', '')

View File

@ -45,7 +45,8 @@ function createApp (source, object, routes, argv) {
var defaultsOpts = {
logger: !argv.quiet,
readOnly: argv.readOnly,
noCors: argv.noCors
noCors: argv.noCors,
noGzip: argv.noGzip
}
if (argv.static) {