-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Add support for Brotli #9387
Add support for Brotli #9387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably middleware should be configurable to select set of compression algos
2f90593
to
b44f02f
Compare
2929787
to
6fd41fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: mpl <mathieu.lonjaret@gmail.com>
Thank you so much! |
Thank you! |
Can someone help as to how can I turn on brotli (possibly within docker-compose config)? Powered up v 2.9.5 in docker image but not sure how to go about replacing gzip with brotli compression? |
Hello @martinbabic, The milestone of this PR is |
Hackaethon (Hackathon) entry
What does this PR do?
This PR adds support for the Brotli compression algorithm to Traefik.
Some breaking changes:
a new functionality is that if a request's
Accept-Encoding
header is set to*
, a compressed response will now be sent, instead of the previous non-compressed response. Brotli is used when*
is set because the gzip library used seems to ignore it.Also, If the Accept-Encoding request header is absent, it is meant as br compression is requested. If it is present, but its value is the empty string, then compression is disabled.
Fixes #4202
Motivation
This was a suggested issue for the Traefik Proxy 3.0 Hackaethon. It looked achievable with my schedule.
More
Additional Notes
Co-authored-by: Mathieu Lonjaret mathieu.lonjaret@gmail.com
Co-authored-by: Tom Moulard tom.moulard@traefik.io
Co-authored-by: Romain rtribotte@users.noreply.github.com
Co-authored-by: Kevin Pollet pollet.kevin@gmail.com