Skip to content

Instantly share code, notes, and snippets.

@DannyBen
Last active May 7, 2019 18:51
Show Gist options
  • Select an option

  • Save DannyBen/1d8af2c025301edd90342c589009ba63 to your computer and use it in GitHub Desktop.

Select an option

Save DannyBen/1d8af2c025301edd90342c589009ba63 to your computer and use it in GitHub Desktop.
Minimal Server for Request Header Debugging
# Usage:
# $ rackup -p3000
# $ curl localhost:3000
require 'rack'
require 'yaml'
run proc { |env| [200, {'Content-Type' => 'text/html'}, [env.select { |key| key.include?('HTTP_') }.to_yaml ] ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment