HTTP Headers missing in Nginx

While ago, we had an issue when our Rails 3 code was all fine when
running locally, but when pushed to production it wasn’t working.

Looking at the log files, it turned out that some of the HTTP headers
our code was looking for were missing on production.Our production
server runs RoR with Passenger and
Nginx and there lies the problem:

If you have underscores in your HTTP headers, Nginx ignores them by
default.

To change this behaviour, add this line to the http section of your
Nginx configuration file:

  
 underscores_in_headers    on;

Khash Sajadi

Khash is the founder and CEO of Cloud 66, a full stack container management as a service. Follow him on @khash

London, UK and San Francisco, US
Subscribe and get updates

Have feedback? Please get in touch @cloud66 on Twitter.

Everything you need to build, manage and maintain containers in production on your own servers and any cloud

Try Cloud 66 — 14 Days Free Trial, No credit card required