mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
chore: Move version comment to the top of the template
to ensure that the version is always the first output line. Also, always output `# nginx-proxy`, even if the version isn't known. This makes it easier to find the start of the generated config in the output of `nginx -T`.
This commit is contained in:
parent
d6d53893e8
commit
e97bf606c8
@ -1,3 +1,5 @@
|
|||||||
|
# nginx-proxy{{ if $.Env.NGINX_PROXY_VERSION }} version : {{ $.Env.NGINX_PROXY_VERSION }}{{ end }}
|
||||||
|
|
||||||
{{- /*
|
{{- /*
|
||||||
* Global values. Values are stored in this map rather than in individual
|
* Global values. Values are stored in this map rather than in individual
|
||||||
* global variables so that the values can be easily passed to embedded
|
* global variables so that the values can be easily passed to embedded
|
||||||
@ -9,7 +11,6 @@
|
|||||||
{{- $_ := set $globals "Env" $.Env }}
|
{{- $_ := set $globals "Env" $.Env }}
|
||||||
{{- $_ := set $globals "Docker" $.Docker }}
|
{{- $_ := set $globals "Docker" $.Docker }}
|
||||||
{{- $_ := set $globals "CurrentContainer" (where $globals.containers "ID" $globals.Docker.CurrentContainerID | first) }}
|
{{- $_ := set $globals "CurrentContainer" (where $globals.containers "ID" $globals.Docker.CurrentContainerID | first) }}
|
||||||
{{- $_ := set $globals "nginx_proxy_version" (coalesce $globals.Env.NGINX_PROXY_VERSION "") }}
|
|
||||||
{{- $_ := set $globals "external_http_port" (coalesce $globals.Env.HTTP_PORT "80") }}
|
{{- $_ := set $globals "external_http_port" (coalesce $globals.Env.HTTP_PORT "80") }}
|
||||||
{{- $_ := set $globals "external_https_port" (coalesce $globals.Env.HTTPS_PORT "443") }}
|
{{- $_ := set $globals "external_https_port" (coalesce $globals.Env.HTTPS_PORT "443") }}
|
||||||
{{- $_ := set $globals "sha1_upstream_name" (parseBool (coalesce $globals.Env.SHA1_UPSTREAM_NAME "false")) }}
|
{{- $_ := set $globals "sha1_upstream_name" (parseBool (coalesce $globals.Env.SHA1_UPSTREAM_NAME "false")) }}
|
||||||
@ -164,10 +165,6 @@ upstream {{ .Upstream }} {
|
|||||||
}
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if ne $globals.nginx_proxy_version "" }}
|
|
||||||
# nginx-proxy version : {{ $globals.nginx_proxy_version }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
|
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
|
||||||
# scheme used to connect to this server
|
# scheme used to connect to this server
|
||||||
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user