Rack Middleware for JSON APIs accessed cross-domain from legacy browsers