Merge pull request #1523 from liquidweb/master

Include the serversnippet from the config map in server blocks
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-10-12 19:12:12 -04:00 committed by GitHub
commit 1257e0654a

View file

@ -365,6 +365,10 @@ http {
server_name {{ $server.Hostname }} {{ $server.Alias }}; server_name {{ $server.Hostname }} {{ $server.Alias }};
{{ template "SERVER" serverConfig $all $server }} {{ 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 }} {{ template "CUSTOM_ERRORS" $all }}
} }
@ -818,7 +822,7 @@ stream {
return 503; return 503;
{{ end }} {{ end }}
} }
{{ end }} {{ end }}
{{ if eq $server.Hostname "_" }} {{ if eq $server.Hostname "_" }}