Reputation: 4255
I'm trying to debug an issue with Rails not showing the right IP, and I'd like to know how to show the headers that Rack receives from nginx, and how Rails sees them after they've been processed by all the rack middleware. Is there a straightforward way to do this within the context of a Rails 4.2.x application?
Upvotes: 1
Views: 795
Reputation: 76774
You'll be able to use the request.headers
:
#controller action
request.headers.each do |header|
header
end
Upvotes: 1