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

NGINX underscores_in_headers and custom templates #632

Closed
Joshuabaker2 opened this issue Apr 20, 2017 · 5 comments · Fixed by #635
Closed

NGINX underscores_in_headers and custom templates #632

Joshuabaker2 opened this issue Apr 20, 2017 · 5 comments · Fixed by #635
Assignees
Labels

Comments

@Joshuabaker2
Copy link

I'm setting up the nginx ingress controller, and was wanting to set the underscores_in_headers option that is available for nginx. As of right now, there's no way to do that other than by setting a custom template, for which the docs are a bit lean (recognizing of course that this repo is still in a state of flux).

It would be nice to simply have underscores_in_headers as an option in the configmap as seen here. In an ideal world, it would be awesome to have a generic handler for all nginx settings, but that might be a bit ambitious.

One of my motivations for using the nginx ingress controller was to avoid having to have kubernetes configs and a separate nginx config.

That being said, I can see how the custom template is useful because it allows for more generic options to be set. I'm not 100% certain how it works because I don't see the nginx.tmpl in the example. I imagine how it works (guessing here) is that I would simply copy the nginx.tmpl, modify it, then create a Dockerfile copying that over to the correct location in the nginx-ingress-controller container. It would be amazing to have docs with a full example of how this might be set up if that is how it works, and if there is a simpler way, it would be great to see that fully fleshed out.

@aledbf aledbf self-assigned this Apr 20, 2017
@aledbf
Copy link
Member

aledbf commented Apr 20, 2017

@Joshuabaker2 sure, the feature will be available as enable-underscores-in-headers in the next beta.
The default will be off (like now)

@Joshuabaker2
Copy link
Author

Awesome! Thanks for the amazingly quick response! Looking forward to it.

@hvalle
Copy link

hvalle commented Apr 20, 2017

Can we throw in ignore invalid headers also?

@aledbf
Copy link
Member

aledbf commented Apr 20, 2017

@hvalle sure.

@edwin--zhao
Copy link

@aledbf if we config underscores_in_headers on.
when mapping headers to CGI variables, as both dashes and underscores are mapped to underscores during that process. whether can cause some problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants