Skip to content

Conversation

@thetechnick
Copy link
Contributor

Fixes #86

#configmap data: proxy-hide-headers: X-My-Header,Strict-Transport-Security #ingress annotations: nginx.org/proxy-hide-headers: X-My-Header,Strict-Transport-Security

will render:

proxy_hide_header Strict-Transport-Security; proxy_hide_header X-My-Header; 
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'be great if you could add the proxy_pass_header directive also, as discussed in #86
Please uncheck changes to the Makefile.

if ingCfg.ProxyHideHeaders == nil || len(ingCfg.ProxyHideHeaders) == 0 {
ingCfg.ProxyHideHeaders = proxyHideHeaders
} else {
ingCfg.ProxyHideHeaders = append(ingCfg.ProxyHideHeaders, proxyHideHeaders...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the nginx.org/proxy-hide-headers annotations exists, it's better to overwrite the value provided by the configmap. Such a behavior is consistent with the behaviour of the proxy_hide_header NGINX directive.

@pleshakov pleshakov merged commit 9d0f75d into nginx:master Dec 1, 2016
@pleshakov
Copy link
Contributor

thx!

@pleshakov pleshakov added this to the v0.7.0 milestone Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants