colour-science / flask-compress

Compress responses of your Flask application.
MIT License
117 stars 27 forks source link

added `COMPRESS_STREAMS` flag #36

Closed christopherpickering closed 2 years ago

christopherpickering commented 2 years ago

Thanks for the tool @alexprengere and others!

This pr is to close #33 and close #35 while still supporting folks how want to disable stream compression.

v 1.12 has also broken compression for my site's css and js.

To disable stream compression add COMPRESS_STREAMS=False to the flask config.

The default (to make flask-compress continue working with the many existing live sites... is COMPRESS_STREAMS=True.

@gilad9366 @raphaeljolivet

I also added in tests to verify the changes.

alexprengere commented 2 years ago

Thank you for stepping up and writing this PR. I will merge it and make a release, as it looks like the practical thing to do. I still have hope that there would be some way to dissociate "regular streaming" vs "serving static content", perhaps changing a bit core Flask if not possible today.

christopherpickering commented 2 years ago

Thank you very much!