3 # Allow any and all cross-origin requests to the API. Allow any origin, and
4 # any headers. Non-browser requests do not have origin or header restrictions,
5 # so browser-requests should be similarly permitted. (Though the API does not
6 # require any custom headers, Ajax frameworks may automatically add headers
7 # such as X-Requested-By to requests.)
8 Rails.configuration.middleware.use Rack::Cors do
11 resource "/oauth/*", :headers => :any, :methods => [:get, :post]
12 resource "/api/*", :headers => :any, :methods => [:get, :post, :put, :delete]