1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00
Check the '.Internal' network property, because the .Gateway property is
defined for internal networks as well.
This commit is contained in:
Gilles Filippini 2023-12-19 19:20:56 +01:00
parent 57a350364d
commit a2ade38abb

View File

@ -75,7 +75,7 @@
{{- continue }} {{- continue }}
{{- end }} {{- end }}
{{- range sortObjectsByKeysAsc $.globals.CurrentContainer.Networks "Name" }} {{- range sortObjectsByKeysAsc $.globals.CurrentContainer.Networks "Name" }}
{{- if and . .Gateway }} {{- if and . .Gateway (not .Internal) }}
# container is in host network mode, using {{ .Name }} gateway IP # container is in host network mode, using {{ .Name }} gateway IP
{{- $ip = .Gateway }} {{- $ip = .Gateway }}
{{- break }} {{- break }}