diff --git a/lib/index.js b/lib/index.js index c758c9a..a1e9c48 100644 --- a/lib/index.js +++ b/lib/index.js @@ -11,6 +11,7 @@ const optionsSchema = Joi.object({ defaultTags: Joi.array().items(Joi.string()).optional(), path: Joi.string().optional(), basePath: Joi.string().optional(), + disableCompression: Joi.boolean().optional(), swaggerEndpoint: Joi.string().optional(), swaggerOptions: Joi.object({ validatorUrl: Joi.string().allow(null, false).optional(), @@ -179,8 +180,9 @@ function register (plugin, options) { method: 'GET', path: path, options: { + ...(options.disableCompression ? { compression: {} } : {}), handler: internals.handler, - auth: settings.auth + auth: settings.auth, } } })) @@ -190,6 +192,7 @@ function register (plugin, options) { method: 'GET', path: path, options: { + ...(options.disableCompression ? { compression: {} } : {}), handler: { directory: { path: swaggerUiPath,