plugin-rewritebody
plugin-rewritebody copied to clipboard
Replace string with dynamic variable
Hi,
I need to replace the host in the URL that in the body of the response to the current host like in this example from Nginx:
sub_filter '<img src="http://127.0.0.1:8080/' '<img src="https://$host/';
http://nginx.org/en/docs/http/ngx_http_sub_module.html
Any plan to add this feature? How I see from the code this feature can be implemented.
Syntax for example:
regex= "<img src="http://127.0.0.1:8080/"
replacement = "<img src="https://%s/"
replacementVariables = [req.Host]
Because of this I still need Nginx and http_sub_module