traefik / plugin-rewritebody

Rewrite body is a middleware plugin for Traefik which rewrites the HTTP response body by replacing a search regex by a replacement string
https://plugins.traefik.io/plugins/628c9ec2ffc0cd18356a97a2/log4-shell
Apache License 2.0
56 stars 21 forks source link

Not an issue - gzip'ed content #23

Open amanas opened 2 years ago

amanas commented 2 years ago

Sorry, this is not an issue (I think), just and idea to include.

I am observing that when a service returns a gzip'ed file (javascript in my case), rewrite body is not rewriting the response.

Any chance the plugin to do: gzip service response -> plugin-rewritebody un-gzip -> plugin-rewritebody rewrite body -> plugin-rewritebody gzip -> and so on...

Sorry not to make a pull request by my own but unfortunately I have no Go knowledge.

Cheers.

hongbo-miao commented 2 years ago

I found https://github.com/packruler/rewrite-body which might help. 😊