Merge bdc3b66ffc
into 120bb1deb0
This commit is contained in:
commit
4c22c90c66
1 changed files with 4 additions and 4 deletions
|
@ -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 }}
|
||||||
|
|
Loading…
Reference in a new issue