1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00

feat: Add a warning comment if the container port is published

This commit is contained in:
Richard Hansen 2023-01-26 18:53:50 -05:00
parent 5a8a6ceae2
commit daeed502cb

View File

@ -117,6 +117,11 @@ upstream {{ .Upstream }} {
# Exposed ports:{{ range $container.Addresses }} {{ .Port }}/{{ .Proto }}{{ else }} (none){{ end }} # Exposed ports:{{ range $container.Addresses }} {{ .Port }}/{{ .Proto }}{{ else }} (none){{ end }}
# Default virtual port: {{ $defaultPort }} # Default virtual port: {{ $defaultPort }}
# VIRTUAL_PORT: {{ $container.Env.VIRTUAL_PORT }} # VIRTUAL_PORT: {{ $container.Env.VIRTUAL_PORT }}
{{- if and $address $address.HostPort }}
# /!\ WARNING: Virtual port published on host. Clients might be able to
# bypass nginx-proxy and access the container's server
# directly.
{{- end }}
{{- if $container.Node.ID }} {{- if $container.Node.ID }}
# Swarm node name: {{ $container.Node.Name }} # Swarm node name: {{ $container.Node.Name }}
{{- end }} {{- end }}