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

Replace string with dynamic variable #5

Open
Bukashk0zzz opened this issue Sep 10, 2020 · 0 comments · May be fixed by #11
Open

Replace string with dynamic variable #5

Bukashk0zzz opened this issue Sep 10, 2020 · 0 comments · May be fixed by #11
Assignees

Comments

@Bukashk0zzz
Copy link

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

@youkoulayley youkoulayley linked a pull request Oct 20, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants