0

we have a setup where nginx is a load balancer for 2 apache tomcat webservers. When I make a request to a REST service through the load balancer, a certain header is always omitted when the request is forwarded to the tomcat servers.

curl -X POST -H Content-Type:text/xml -H Accept:text/xml -H api_key:secretkey -H Cache-Control:no-cache -d 'some date' http://load-balancer

The api_key header is always omitted. When I call the tomcat servers directly everything works as expected.

Any Ideas ?

Abhijith
  • 2,592
  • 5
  • 18
  • 30
  • Could you please post your nginx configuration for the proxy pass-through? It's likely that you're missing a directive. – Brian Knight Mar 19 '14 at 02:36
  • why are u sending it as a header not a post parameter? – Mohammad AbuShady Mar 19 '14 at 10:21
  • Found the answer here http://stackoverflow.com/questions/8393772/how-to-get-non-standard-http-headers-on-nginx and http://stackoverflow.com/questions/6295808/header-variables-go-missing-in-production – Abhijith Mar 19 '14 at 15:22

1 Answers1

0

Found the answer here How to get non-standard HTTP headers on nginx? and header variables go missing in production

There is an option in the configuration to ignore headers with underscores in them.

Community
  • 1
  • 1
Abhijith
  • 2,592
  • 5
  • 18
  • 30