1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-06-30 22:05:46 +00:00

fix: HTTPS redirection with custom HTTPS port

This commit is contained in:
John Stucklen
2021-06-15 00:22:17 +02:00
committed by Nicolas Duchon
parent 6bb7c37605
commit fa8b0d7bad
2 changed files with 5 additions and 1 deletions

View File

@ -276,7 +276,11 @@ server {
}
location / {
{{ if eq $external_https_port "443" }}
return 301 https://$host$request_uri;
{{ else }}
return 301 https://$host:{{ $external_https_port }}$request_uri;
{{ end }}
}
}
{{ end }}