Use Rack::Cors for cross domain requests