Created
October 28, 2011 16:18
-
-
Save irohiroki/1322662 to your computer and use it in GitHub Desktop.
A sinatra server that accepts POSTs from anywhere(!) ... and disposes them ;p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
configure do | |
set :port, 9999 | |
end | |
allow_all = { | |
'Access-Control-Allow-Headers' => 'X-Requested-With, X-File-Name, Content-Type', | |
'Access-Control-Allow-Origin' => '*', | |
} | |
options '/bogus' do | |
headers allow_all | |
end | |
post '/bogus' do | |
headers allow_all | |
body '{"success":true,"hash":"8f5110383049cf6ed31a049fa9d003fd2a0b8c51"}' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment