From 08ab5455454a6f3f9cb640042c0eb4e778ebf46d Mon Sep 17 00:00:00 2001 From: "Gabriel M. Dutra" Date: Fri, 19 Jul 2024 01:37:19 -0300 Subject: [PATCH] crossplane: Add directive 'proxy_pass_header' Signed-off-by: Gabriel M. Dutra --- internal/ingress/controller/template/crossplane/http.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/ingress/controller/template/crossplane/http.go b/internal/ingress/controller/template/crossplane/http.go index a8343d996..23b209c53 100644 --- a/internal/ingress/controller/template/crossplane/http.go +++ b/internal/ingress/controller/template/crossplane/http.go @@ -180,6 +180,10 @@ func (c *crossplaneTemplate) buildHTTP() { httpBlock = append(httpBlock, buildDirective("error_log", cfg.ErrorLogPath, cfg.ErrorLogLevel)) } + if cfg.AllowBackendServerHeader { + httpBlock = append(httpBlock, buildDirective("proxy_pass_header", "Server")) + } + c.config.Parsed = append(c.config.Parsed, &ngx_crossplane.Directive{ Directive: "http", Block: httpBlock,