Skip to content

Replace string with dynamic variable #5

@Bukashk0zzz

Description

@Bukashk0zzz

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions