Didn't handle case where no colon was given in VIRTUAL_HOST. Now correctly only grabs the port if there was one set. Before had gotten the host by mistake if no colon

This commit is contained in:
Donal Byrne 2014-12-03 20:50:10 +01:00
parent 65e0dc0705
commit aad20386b3

View file

@ -49,7 +49,7 @@ upstream {{ $host }} {
server {{ $address.IP }}:{{ $address.Port }};
{{ end }}
{{/* If more than one port exposed, use the one matching after the colon in VIRTUAL_HOST env var */}}
{{ else if $port }}
{{ else if (and ($port ) (ne $port $host) ) }}
{{ range $address := .Addresses }}
{{ if eq $address.Port $port }}
# {{$container.Name}}