Skip to content

Instantly share code, notes, and snippets.

@josepjaume
Created September 22, 2014 09:43
Show Gist options
  • Select an option

  • Save josepjaume/80535b2940d93afb886c to your computer and use it in GitHub Desktop.

Select an option

Save josepjaume/80535b2940d93afb886c to your computer and use it in GitHub Desktop.

Revisions

  1. josepjaume created this gist Sep 22, 2014.
    1 change: 1 addition & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    gem 'rack-cors'
    10 changes: 10 additions & 0 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    module App
    class Application < Rails::Application
    config.middleware.use Rack::Cors do
    allow do
    origins '*'
    resource '*', methods: [:get, :post, :put, :delete, :options], headers: :any
    end
    end
    end
    end