Selectively disable GZipMiddleware in the context of FileResponse #1837
-
I've run into a usecase where Starlette is returning a FileResponse of an already compressed file. Given that GZipMiddleware offers no way to selectively disable it on certain endpoints, there's a fair amount of CPU time spent gzipping a file for no benefit, greatly slowing down total transfer time. I'm unclear what the best PR would be on https://github.com/encode/starlette/blob/master/starlette/middleware/gzip.py, but I wanted to float the idea past the community first before submitting something for review. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think the solution to this is #1649 |
Beta Was this translation helpful? Give feedback.
I think the solution to this is #1649