Skip to content

Instantly share code, notes, and snippets.

@braidn
Created July 21, 2016 14:28
Show Gist options
  • Save braidn/a72241a240b467165b297971e4fda050 to your computer and use it in GitHub Desktop.
Save braidn/a72241a240b467165b297971e4fda050 to your computer and use it in GitHub Desktop.
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
require 'rack/cors'
use Rack::Cors do
allow do
origins '*'
resource '*',
:headers => :any,
:methods => [:get, :post, :delete, :put, :options],
:credentials => true,
:max_age => 0,
:expose => :location
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment