By leatnova
I have an API running on the DO app platform, which uses FastAPI and uvicorn. Both of these tools are not configured to compress the API responses and there is no compression during development. But if I look at the released version on DO, the replies got the HTTP header: “content-encoding: br”. Who adds this compression or where is it documented? Its nice but confusing.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
I believe that the DigitalOcean App Platform uses Cloudflare as part of its infrastructure, and as far as I know Cloudflare automatically applies Brotli or Gzip compression to responses when supported by the client.
That’s why you see content-encoding: br
in production but not in local development.
If you want to verify this behavior, you can check the server
and cf-cache-status
headers in your API response. You can also read more about Cloudflare’s automatic compression here:
👉 Cloudflare Compression
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.