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

Enable brotli compression to be forced #375

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

jmlsteele
Copy link

Copy the mechanism used in the mod_deflate module to allow compression to be forced by using an environment variable named force-brotli.

An example use case:
Our reverse proxy needs to run the SUBSTITUTE filter on pages returned from a 3rd party app server. We strip out the Accept-Encoding header before proxying the request to the 3rd party, but that prevents brotli from running after we've run SUBSTITUTE. By adding this environment variable check, we can check the Accept-Encoding header using mod_rewrite, set the force-brotli environment variable if appropriate, unset the Accept-Encoding header to get raw content from 3rd party server, while still sending compressed data to the client, thus saving large amounts of bandwidth.

mod_deflate's force-gzip by adding support for a force-brotli
environment variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant