Commit fc88c3c8 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Use the Host header for routing

parent 50819dd7
Pipeline #20306 passed with stage
in 31 seconds
......@@ -116,9 +116,9 @@ frontend fe_proxy
use_backend be_utils if is_health
use_backend be_letsencrypt if is_letsencrypt
{{range $site := .Sites}}
{{"\t"}}acl domain_{{.Name}} ssl_fc_sni -i {{.Domain}}
{{"\t"}}acl domain_{{.Name}} hdr(Host) -i {{.Domain}}
{{range $i, $domain := .AltDomains -}}
{{"\t"}}acl alt_domain_{{$site.Name}}_{{$i}} ssl_fc_sni -i {{.}}
{{"\t"}}acl alt_domain_{{$site.Name}}_{{$i}} hdr(Host) -i {{.}}
{{end -}}
{{if .EnableAuth -}}
{{"\t"}}acl auth_{{$site.Name}} http_auth(users_{{$site.Name}})
......
......@@ -140,8 +140,8 @@ frontend fe_proxy
use_backend be_utils if is_health
use_backend be_letsencrypt if is_letsencrypt
acl domain_example ssl_fc_sni -i example.com
acl alt_domain_example_0 ssl_fc_sni -i www.example.com
acl domain_example hdr(Host) -i example.com
acl alt_domain_example_0 hdr(Host) -i www.example.com
acl route_example_0 path_beg /api
acl route_example_1 path_beg /
use_backend be_example_api if domain_example route_example_0
......@@ -149,7 +149,7 @@ frontend fe_proxy
use_backend be_example_web if domain_example route_example_1
use_backend be_example_web if alt_domain_example_0 route_example_1
acl domain_example2 ssl_fc_sni -i example2.com
acl domain_example2 hdr(Host) -i example2.com
acl auth_example2 http_auth(users_example2)
http-request auth realm private if domain_example2 !auth_example2
acl route_example2_0 path_beg /
......
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