Skip to content

Commit

Permalink
adding compression disabling support
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt committed Nov 9, 2018
1 parent 21ce542 commit aa66d88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
}
}
}))
Expand All @@ -190,6 +192,7 @@ function register (plugin, options) {
method: 'GET',
path: path,
options: {
...(options.disableCompression ? { compression: {} } : {}),
handler: {
directory: {
path: swaggerUiPath,
Expand Down

0 comments on commit aa66d88

Please sign in to comment.