From 0aae81114ab9ddefd38460fb2faea9c57b3b5677 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 "_" }}