diff --git a/Gemfile b/Gemfile index 6e8adef..d25ee16 100644 --- a/Gemfile +++ b/Gemfile @@ -13,5 +13,6 @@ gem 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.8' gem "better_errors" gem "binding_of_caller" gem 'bugsnag', '~> 6.10' +gem 'rack-cors' #gem 'rubocop', '~> 0.49.1', require: false diff --git a/config.ru b/config.ru index 5d78796..67c7256 100644 --- a/config.ru +++ b/config.ru @@ -6,4 +6,11 @@ require 'bundler' Bundler.require require './app.rb' +use Rack::Cors do + allow do + origins '*' + resource '*', headers: :any, methods: [:get, :post, :options] + end +end + run Sinatra::Application