Response Compression
Nolxy automatically compresses proxy responses at the gateway level to reduce bandwidth costs and improve client latency, requiring zero changes to your backend.
Quickstart
Response compression is enabled by default for text-based payloads. No specific configuration is required. Simply ensure your clients send the Accept-Encoding header.
# The gateway automatically negotiations compression curl -H "Accept-Encoding: gzip, br" https://api.yourdomain.com/data
Reference
Nolxy reads the client's Accept-Encoding header and selects the best supported encoding.
Supported Encodings
br (Brotli)Best compression ratio for text.
gzipUniversal support across mostly all clients.
deflateFallback for legacy clients.
identityReturned when client explicitly requests no encoding.
When Compression Is Skipped
- Response body is smaller than 1 KB (overhead exceeds savings).
- Response body exceeds 50 MB.
- Content-Type is not compressible (e.g., images, video, binary data).
- Client does not send
Accept-Encoding.
Compressible Content Types
Nolxy automatically compasses any text/* type, plus common structural types including:
application/jsonapplication/xmlapplication/javascriptapplication/graphql+jsonimage/svg+xmlapplication/ld+jsonExamples
Expected Response Headers
When compression is successfully applied, Nolxy injects specific headers so clients know how to decompress the response.
HTTP/1.1 200 OK Content-Type: application/json Content-Encoding: br Vary: Accept-Encoding ... [brotli compressed data] ...
Common Errors
Response Not Compressed
Missing Header or Undersized Payload
Fix: If your response is not being compressed, verify your client is sending a valid Accept-Encoding header. Additionally, verify that the Content-Type is one of the supported media types and that the body size is greater than 1KB.
Plan Requirements
Response Compression is available on paid plans.