Skip to content
Snippets Groups Projects
Commit 6edb858f authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Auto redirects to https

parent c5a51e7f
No related branches found
No related tags found
No related merge requests found
......@@ -38,17 +38,7 @@ default_backend {{$default_service.hostname}}
frontend http-in
bind *:80
{{range $app := lsdir "/services"}}
{{$hostnames := printf "/services/%s/*" $app}}
{{range gets $hostnames}}
{{$hostname := .Key}}
{{$data := json .Value}}
# {{base $hostname}}:
acl is_{{base $hostname}} hdr(host) -i {{base $hostname}}
acl is_{{base $hostname}} hdr(host) -i www.{{base $hostname}}
use_backend {{base $hostname}} if is_{{base $hostname}}
{{end}}
{{end}}
redirect scheme https code 301 if !{ ssl_fc }
{{range $app := lsdir "/services"}}
{{$hostnames := printf "/services/%s/*" $app}}
......
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