Skip to content

Commit

Permalink
Update compression middleware config
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Nov 11, 2024
1 parent 0fc2695 commit 42c183a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
9 changes: 1 addition & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,7 @@ const updateGalnetNews = require('./lib/cron-tasks/galnet-news')
})

// Enable content compression
app.use(koaCompress({
filter: (content_type) => {
return /text/i.test(content_type)
},
threshold: 2048,
flush: Z_SYNC_FLUSH,
deflate: Z_SYNC_FLUSH
}))
app.use(koaCompress())

router.get('/', (ctx) => { ctx.body = printStats() })
router.get('/api', (ctx) => { ctx.body = printStats() })
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ardent-api",
"version": "4.10.0",
"version": "4.10.1",
"description": "Ardent API provides access to data submitted to EDDN",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 42c183a

Please sign in to comment.