Commit 3749d64e authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend: Implement type:redirect

parent 0cde3291
......@@ -55,7 +55,7 @@ md5sum = 4dbb8560e4de1af2a0706b020e713fe7
[template-default-slave-virtualhost]
filename = templates/default-virtualhost.conf.in
md5sum = 95df69224d6f6554a674f5e3efebaa8f
md5sum = ae1f697a837ea31524278b35af74a823
[template-cached-slave-virtualhost]
filename = templates/cached-virtualhost.conf.in
......
......@@ -80,7 +80,9 @@
to /VirtualHostBase/{scheme}%2F%2F{hostonly}:{{ slave_parameter.get('virtualhostroot-https-port', '443') }}%2F{{ slave_parameter.get('path', '') }}%2FVirtualHostRoot/{1}
}
{% elif slave_type == 'redirect' -%}
# TODO-Caddy RewriteRule (.*) {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}$1 [R,L]
redir 302 {
/ {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}{uri}
}
{% else -%}
{% if 'default-path' in slave_parameter %}
redir 301 {
......@@ -145,7 +147,9 @@
{%- if https_only %}
redir / https://{host}{uri}
{% elif slave_type == 'redirect' -%}
# TODO-Caddy RewriteRule (.*) {{slave_parameter.get('url', '')}}$1 [R,L]
redir 302 {
/ {{ slave_parameter.get('https-url', slave_parameter.get('url', ''))}}{uri}
}
{% elif slave_type == 'zope' -%}
proxy / {{ slave_parameter.get('https-url', slave_parameter.get('url', '')) }} {
transparent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment