You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several response compression libraries out there for Sanic, but they are mostly out of date, and none support the more complex streaming and chunked response case.
Using a reverse proxy is generally the best way to accomplish this for production -- such as Nginx -- but it is handy to have if one wants to limit data on the network between a reverse proxy and Sanic.
I think it's worth discussing if perhaps this is a "batteries included" feature that could be part of sanic-ext due to how common it is as a requirement.
It currently lacks streaming and chunked response compression, but I'd be interested in adding that if someone could provide me with the hooks in Sanic that would be needed to accomplish it (I couldn't find any in docs).
The text was updated successfully, but these errors were encountered:
dmckeone
changed the title
Add Common Response Compression?
[Feature Request] Response Compression
Sep 20, 2023
There are several response compression libraries out there for Sanic, but they are mostly out of date, and none support the more complex streaming and chunked response case.
Using a reverse proxy is generally the best way to accomplish this for production -- such as Nginx -- but it is handy to have if one wants to limit data on the network between a reverse proxy and Sanic.
Prior art:
I think it's worth discussing if perhaps this is a "batteries included" feature that could be part of
sanic-ext
due to how common it is as a requirement.I've combined the above 2 libraries into a single, modern Sanic Extension here: https://gist.github.com/dmckeone/b6d2160389640270eb24d4b0555a7768
It currently lacks streaming and chunked response compression, but I'd be interested in adding that if someone could provide me with the hooks in Sanic that would be needed to accomplish it (I couldn't find any in docs).
The text was updated successfully, but these errors were encountered: