-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support compression encoding #4
Comments
It works on the raw bytes of the response, regardless of encoding. To manipulate the decoded body, the handler would need a way to be configured to decode the body, perform the replacement, then re-encode. Open to pull requests. |
@francislavoie came up with a clever solution if the encoded content comes from
(Of course, this doesn't help for precompressed static files so much. I guess you could set up an internal file server to serve the static files to which you proxy, and that could work.) |
I was reverse-proxying to a server I had not control over and wanted to inject javascript into the response by replacing a |
Unless I am misinterpreting the code and set up my Caddy incorrectly, this module does not support replacing gzip/zstd/etc. compression encoded files. Since most people use Caddyserver as a reverse proxy for services, and many popular services serve gzip-encoded files, this module does not work in the majority of configurations.
Would love if this could be implemented (or even better, if I am misinterpreting the code and this is already supported).
The text was updated successfully, but these errors were encountered: