github-project-automation · GitHub

@nitishagar

@nitishagar

@nitishagar

petemoore

@nitishagar

petemoore

@petemoore

Apply compression once at the lib-api router level so every service
automatically compresses large API responses. No service-level wiring
required.
Changes from review feedback:
- Use `compression()` defaults instead of pinning level/threshold
- Drop redundant app-level compression() in web-server createApp;
  apply it specifically at the /graphql mount since GraphQL responses
  don't go through the lib-api router
- Expand test coverage: no-gzip client, decoded body round-trip,
  pre-set Content-Encoding preserved (no double compression)
- Fix services/github badge tests that asserted on exact
  content-length; compression switches responses to chunked encoding
  so content-length becomes undefined — assert on decoded body size
Fixes taskcluster#8347

@lotas

@petemoore

Read the original on github.com ↗