Add 'proxy_pass_header' directive (#11671)
Signed-off-by: Gabriel M. Dutra <me@dutralabs.xyz>
This commit is contained in:
parent
447e0d5036
commit
796621ccaf
1 changed files with 4 additions and 0 deletions
|
@ -229,6 +229,10 @@ func (c *Template) buildHTTP() {
|
|||
httpBlock = append(httpBlock, buildMapDirective("$http_x_forwarded_for", "$full_x_forwarded_for", forwardForMap))
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue