Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy_hide_header directive #88

Merged
merged 2 commits into from
Dec 1, 2016

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 nginxinc: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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants