Skip to content
Snippets Groups Projects
Commit 7be941f6 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/gentner#2370 Redirects based global search and replace now...

ansible-inventories/gentner#2370 Redirects based global search and replace now require an explicit match argument which may be different from the search
parent 4e9df07d
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,7 @@ frontend http_in
http-request auth realm notprivate if !letsencrypt_challenge privatedomain !privateip !private_auth
{% endif %}
{% for redirect in proxy_redirect_search_replace|default([]) %}
http-request redirect code 301 location %[url,regsub(\"{{ redirect.search }}\",\"{{ redirect.replace }}\",i)] if !letsencrypt_challenge { path_reg {{ redirect.search }} }
http-request redirect code 301 location %[url,regsub(\"{{ redirect.search }}\",\"{{ redirect.replace }}\",i)] if !letsencrypt_challenge { path_reg {{ redirect.match }} }
{% endfor %}
{% for line in proxy_extra_lines|default([]) %}
{{ line }}
......@@ -221,7 +221,7 @@ frontend https_in_{{ cert.ip }}
http-request auth realm notprivate if privatedomain !privateip !private_auth
{% endif %}
{% for redirect in proxy_redirect_search_replace|default([]) %}
http-request redirect code 301 location %[url,regsub(\"{{ redirect.search }}\",\"{{ redirect.replace }}\",i)] if { path_reg ^/{{ redirect.search }} }
http-request redirect code 301 location %[url,regsub(\"{{ redirect.search }}\",\"{{ redirect.replace }}\",i)] if { path_reg ^/{{ redirect.match }} }
{% endfor %}
{% for line in proxy_extra_lines|default([]) %}
{{ line }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment