Implement Cross-Origin Resource Sharing:

* Add Api::ApplicationController
* Route OPTION requests (CORS preflight) to API application controller
* Filter all API requests through #cor_filter in API application
  controller
This commit is contained in:
Thibault Jouan
2012-02-26 14:10:19 +00:00
parent 88d3242843
commit 6379da88e2
6 changed files with 118 additions and 1 deletions

View File

@@ -3,6 +3,8 @@ Scube::Application.routes.draw do
namespace :v0 do
resources :playlists, :only => [:index]
end
match '*all' => 'application#cor_preflight', :via => :options
end
resources :sounds, :only => [:show]