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

Provide a way to disable compression per view #5

Open
friedelwolff opened this issue Aug 10, 2019 · 1 comment
Open

Provide a way to disable compression per view #5

friedelwolff opened this issue Aug 10, 2019 · 1 comment

Comments

@friedelwolff
Copy link
Owner

For some views (e.g. views generating already compressed file types like PDF, PNG, etc) it isn't worth trying to compress them. It would be useful to be able to exclude certain views from the middleware's automatic compression.

@psyonara
Copy link

psyonara commented Oct 15, 2019

I have an idea - was poking around Django's docs, and suddenly realized that Django's @csrf_exempt decorator serves the same purpose as what we want to do here: prevent a piece of middleware from running against a specific view. So I'll dig into that and maybe we can do it the same way.

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

2 participants