This commit is contained in:
Justin Garrison 2017-11-30 14:57:28 +00:00 committed by GitHub
commit 4c22c90c66

View file

@ -390,9 +390,9 @@ http {
{{ if ne $all.ListenPorts.HTTPS 443 }} {{ if ne $all.ListenPorts.HTTPS 443 }}
{{ $redirect_port := (printf ":%v" $all.ListenPorts.HTTPS) }} {{ $redirect_port := (printf ":%v" $all.ListenPorts.HTTPS) }}
return 301 $scheme://{{ $to }}{{ $redirect_port }}$request_uri; return 308 $scheme://{{ $to }}{{ $redirect_port }}$request_uri;
{{ else }} {{ else }}
return 301 $scheme://{{ $to }}$request_uri; return 308 $scheme://{{ $to }}$request_uri;
{{ end }} {{ end }}
} }
{{ end }} {{ end }}
@ -687,9 +687,9 @@ stream {
if ($pass_access_scheme = http) { if ($pass_access_scheme = http) {
{{ if ne $all.ListenPorts.HTTPS 443 }} {{ if ne $all.ListenPorts.HTTPS 443 }}
{{ $redirect_port := (printf ":%v" $all.ListenPorts.HTTPS) }} {{ $redirect_port := (printf ":%v" $all.ListenPorts.HTTPS) }}
return 301 https://$best_http_host{{ $redirect_port }}$request_uri; return 308 https://$best_http_host{{ $redirect_port }}$request_uri;
{{ else }} {{ else }}
return 301 https://$best_http_host$request_uri; return 308 https://$best_http_host$request_uri;
{{ end }} {{ end }}
} }
{{ end }} {{ end }}