Change alias behaviour not to create new server section needlessly
This commit is contained in:
parent
a18daabc51
commit
e78ad92c87
2 changed files with 2 additions and 16 deletions
|
|
@ -362,26 +362,12 @@ http {
|
|||
{{ range $index, $server := $servers }}
|
||||
|
||||
server {
|
||||
server_name {{ $server.Hostname }};
|
||||
server_name {{ $server.Hostname }} {{ $server.Alias }};
|
||||
{{ template "SERVER" serverConfig $all $server }}
|
||||
|
||||
|
||||
{{ template "CUSTOM_ERRORS" $all }}
|
||||
}
|
||||
|
||||
{{ if $server.Alias }}
|
||||
server {
|
||||
server_name {{ $server.Alias }};
|
||||
{{ template "SERVER" serverConfig $all $server }}
|
||||
|
||||
{{ if not (empty $cfg.ServerSnippet) }}
|
||||
# Custom code snippet configured in the configuration configmap
|
||||
{{ $cfg.ServerSnippet }}
|
||||
{{ end }}
|
||||
|
||||
{{ template "CUSTOM_ERRORS" $all }}
|
||||
}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
# default server, used for NGINX healthcheck and access to nginx stats
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue