crossplane: Add directive 'proxy_pass_header'

Signed-off-by: Gabriel M. Dutra <me@dutralabs.xyz>
This commit is contained in:
Gabriel M. Dutra 2024-07-19 01:37:19 -03:00
parent 62522a3d49
commit 08ab545545

View file

@ -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,