Skip to content

Instantly share code, notes, and snippets.

@fl00r
Last active December 19, 2015 12:29
Show Gist options
  • Save fl00r/5955566 to your computer and use it in GitHub Desktop.
Save fl00r/5955566 to your computer and use it in GitHub Desktop.
require 'rack/utils'
run proc{
res = "Hello World"
headers = Rack::Utils::HeaderHash.new
headers["Connection"] = "close"
headers["Content-Length"] = res.bytesize.to_s
headers["Access-Control-Allow-Origin"] = [ "http://mir.mail.ru", "http://my.mail.ru" ]
[200, headers, [res] ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment