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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
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
andcf-cache-status
headers in your API response. You can also read more about Cloudflare’s automatic compression here: 👉 Cloudflare Compression- Bobby