From 306268d24c579d31ab36f281d9743a4138730abb Mon Sep 17 00:00:00 2001 From: Chris Reinhardt Date: Thu, 12 Oct 2017 14:30:05 -0400 Subject: [PATCH] Include the serversnippet from the config map in servers that aren't aliaes --- rootfs/etc/nginx/template/nginx.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/nginx/template/nginx.tmpl b/rootfs/etc/nginx/template/nginx.tmpl index caaec9282..803329327 100644 --- a/rootfs/etc/nginx/template/nginx.tmpl +++ b/rootfs/etc/nginx/template/nginx.tmpl @@ -365,6 +365,10 @@ http { server_name {{ $server.Hostname }} {{ $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 }} } @@ -818,7 +822,7 @@ stream { return 503; {{ end }} } - + {{ end }} {{ if eq $server.Hostname "_" }}