Skip to content

Instantly share code, notes, and snippets.

@danishsatkut
Forked from fallwith/http_headers_dump.rb
Last active August 29, 2015 14:27
Show Gist options
  • Save danishsatkut/f3af82fb4cda0d7c749a to your computer and use it in GitHub Desktop.
Save danishsatkut/f3af82fb4cda0d7c749a to your computer and use it in GitHub Desktop.
Rails controller code to dump raw HTTP headers from a request
logger.error "*** BEGIN RAW REQUEST HEADERS ***"
self.request.env.each do |header|
logger.error "HEADER: #{header[0]} => #{header[1]}"
end
logger.error "*** END RAW REQUEST HEADERS ***"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment