Skip to content

fix: add gzip/brotli response compression middleware (#128)#204

Merged
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
LaGodxy:fix/issue-128-response-compression
Jun 29, 2026
Merged

fix: add gzip/brotli response compression middleware (#128)#204
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
LaGodxy:fix/issue-128-response-compression

Conversation

@LaGodxy

@LaGodxy LaGodxy commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds compression middleware to the NestJS bootstrap function, enabling gzip and brotli encoding for API responses. Large JSON payloads (campaign lists, claim exports) are now compressed automatically, reducing bandwidth usage and improving response times on slow connections.

Changes

  • Install compression npm package
  • Add app.use(compression()) in main.ts after security middleware

Testing

Build passes. Compression is transparent to clients that send Accept-Encoding: gzip or br.

Closes #128

@kilodesodiq-arch kilodesodiq-arch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kilodesodiq-arch kilodesodiq-arch merged commit 197b3d8 into ChainForgee:main Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HIGH] No API response compression (gzip/brotli)

2 participants