class Adsf::Rack::CORS
Public Class Methods
new(app)
click to toggle source
# File lib/adsf/rack/cors.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/adsf/rack/cors.rb, line 9 def call(env) status, headers, body = *@app.call(env) new_headers = headers.merge( 'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Headers' => 'Origin, X-Requested-With, Content-Type, Accept, Range', ) [status, new_headers, body] end