Reputation: 1462
I'm working with a Rails 4 API backend and a mobile app in both Android in iOS. Using Nginx and Unicorn.
To obtain certain data, the cliens must send me (among other things) a user id in the request's headers. We're using a custom header, for example WWW_CUSTOM_NAME
, explained here. I'm aware that in Rails 4, I can capture the value in these custom headers by doing something like
request.headers["HTTP_WWW_CUSTOM_NAME"]
Indeed, this worked every single time my team and I worked in development. But when we pushed the code to the production server, the approach didn't work.
It's almost like the custom header is gone in production. I tried the same thing without the extra "HTTP_", removing capitals letter, and nothing worked. But in development works okay.
Any idea why this must be?
Upvotes: 6
Views: 2870