Skip to content

Instantly share code, notes, and snippets.

@jasoares
Created February 18, 2014 18:40
Show Gist options
  • Select an option

  • Save jasoares/9077034 to your computer and use it in GitHub Desktop.

Select an option

Save jasoares/9077034 to your computer and use it in GitHub Desktop.
Dump the request headers from a request inside a rails controller or authentication before_filter/action
request.env.select { |k,v| k.match("^HTTP.*") }.each do |header|
puts header[0].split('_').last + ': ' + header[1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment