Skip to content
Snippets Groups Projects
Commit 4e9df07d authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/gentner#2370 Add support for redirects based global search...

ansible-inventories/gentner#2370 Add support for redirects based global search and replace on the url
parent 049591bb
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,9 @@ frontend http_in
acl private_auth http_auth(notprivate) if !privateip
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 }} }
{% endfor %}
{% for line in proxy_extra_lines|default([]) %}
{{ line }}
{% endfor %}
......@@ -217,6 +220,9 @@ frontend https_in_{{ cert.ip }}
acl private_auth http_auth(notprivate) if !privateip
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 }} }
{% endfor %}
{% for line in proxy_extra_lines|default([]) %}
{{ line }}
{% endfor %}
......
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