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

How to send additional HTTP headers to Tomcat over AJP? #30

Open
knockoutuser opened this issue Jul 1, 2014 · 1 comment
Open

How to send additional HTTP headers to Tomcat over AJP? #30

knockoutuser opened this issue Jul 1, 2014 · 1 comment

Comments

@knockoutuser
Copy link

How can we send additional HTTP headers to a backend Tomcat server from within nginx, over AJP?

We have an nginx in front of our Tomcat servers and for some /locations we need to add some headers like X-Forwarded-For, X-Forwarded-Proto etc. The Tomcat application will read the headers with request.getHeader().

No matter what we try though, we can't seem to pass the extra headers to our Tomcat servers. What's the nginx configuration needed to pass the additional headers? Is this even possible with the nginx_ajp_module?

Note that I don't want to pass HTTP headers from the browser to Tomcat, I want to "enrich" the headers from inside nginx before passing the request to Tomcat.

@itpp16
Copy link
Contributor

itpp16 commented Dec 31, 2014

A bit late reply but this should work: https://github.com/openresty/headers-more-nginx-module

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

No branches or pull requests

2 participants