1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-06-30 22:05:46 +00:00

fix: do not render regexp hostname in debug endpoint response

This commit is contained in:
Nicolas Duchon
2024-11-04 23:03:01 +01:00
parent a79445feef
commit fdb7310cda
3 changed files with 21 additions and 2 deletions

View File

@ -380,7 +380,8 @@ upstream {{ $vpath.upstream }} {
{{- end }}
{{- $debug_vhost := deepCopy .VHost }}
{{- $_ := set $debug_vhost "hostname" .Hostname }}
{{- /* If it's a regexp, do not render the Hostname to the response to avoid rendering config breaking characters */}}
{{- $_ := set $debug_vhost "hostname" (.VHost.is_regexp | ternary "Hostname is a regexp and unsafe to include in the debug response." .Hostname) }}
{{- $_ := set $debug_vhost "paths" $debug_paths }}
{{- $debug_response := dict