Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Response Compression #230

Open
dmckeone opened this issue Sep 20, 2023 · 0 comments
Open

[Feature Request] Response Compression #230

dmckeone opened this issue Sep 20, 2023 · 0 comments

Comments

@dmckeone
Copy link
Contributor

dmckeone commented 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).

@dmckeone dmckeone changed the title Add Common Response Compression? [Feature Request] Response Compression Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant