mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
fix: debug endpoint formatting
This commit is contained in:
parent
90e9308f87
commit
b0efe80f05
10
nginx.tmpl
10
nginx.tmpl
@ -367,16 +367,16 @@ upstream {{ $vpath.upstream }} {
|
|||||||
{{- define "debug_location" }}
|
{{- define "debug_location" }}
|
||||||
{{- $debug_paths := dict }}
|
{{- $debug_paths := dict }}
|
||||||
{{- range $path, $vpath := .VHost.paths }}
|
{{- range $path, $vpath := .VHost.paths }}
|
||||||
{{- $tmp_port := dict }}
|
{{- $tmp_ports := dict }}
|
||||||
{{- range $port, $containers := $vpath.ports }}
|
{{- range $port, $containers := $vpath.ports }}
|
||||||
{{- $tmp_containers := list }}
|
{{- $tmp_containers := list }}
|
||||||
{{- range $container := $containers }}
|
{{- range $container := $containers }}
|
||||||
{{- $tmp_containers = dict "Name" $container.Name | append $tmp_containers }}
|
{{- $tmp_containers = dict "Name" $container.Name | append $tmp_containers }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $_ := dict $port $tmp_containers | set $tmp_port "ports" }}
|
{{- $_ := set $tmp_ports $port $tmp_containers }}
|
||||||
{{- $tmp_port = deepCopy $vpath | merge $tmp_port }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $_ := set $debug_paths $path $tmp_port }}
|
{{- $debug_vpath := deepCopy $vpath | merge (dict "ports" $tmp_ports) }}
|
||||||
|
{{- $_ := set $debug_paths $path $debug_vpath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- $debug_vhost := deepCopy .VHost }}
|
{{- $debug_vhost := deepCopy .VHost }}
|
||||||
@ -409,7 +409,7 @@ upstream {{ $vpath.upstream }} {
|
|||||||
|
|
||||||
location /nginx-proxy-debug {
|
location /nginx-proxy-debug {
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
return 200 '{{ toJson $debug_response }}';
|
return 200 '{{ toJson $debug_response }}{{ "\\n" }}';
|
||||||
}
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user