use gem sinatra-cross_origin for ajax use.