Skip to content

Conversation

lahma
Copy link
Contributor

@lahma lahma commented Nov 24, 2020

When serving static files the StaticFileMiddleware sets HTTPS compression allowed by default as it's static content and not affected of CRIME/BREACH attacks which rely on attacker modifying returned payload. As AssetMiddleware basically can be compared to StaticFileMiddlewareit makes sense to allow the same logic for response compression.

I've adapted the approach StaticFileMiddleware uses and now also WebOptimizer content is compressed when served via HTTPS. The configuration option defaults and is documented the same way as StaticFileMiddleware version.

@lahma lahma changed the title Support HTTPS compression of returned content Support compression of returned content when served via HTTPS Nov 24, 2020
@madskristensen madskristensen merged commit e13a9db into ligershark:master Nov 24, 2020
@madskristensen
Copy link
Member

Awesome. Thank you!!

@lahma
Copy link
Contributor Author

lahma commented Nov 24, 2020

My pleasure, thanks for maintaining this project!

@lahma lahma deleted the compression branch November 24, 2020 17:07
@benjamin-stern benjamin-stern mentioned this pull request Nov 25, 2021
madskristensen pushed a commit that referenced this pull request Nov 29, 2021
Added edge case considerations for when including response compression as included in the feature #147, to allow for the end user to understand how to make sure  that it compresses the responses and function correctly when utilized with this library.
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

Successfully merging this pull request may close these issues.

2 participants