Skip to content
Permalink
Browse files

Enabled AJAX requests to our API via rack-cors config

  • Loading branch information...
mattboldt committed Dec 27, 2018
1 parent 0c9b56a commit 693f5f40dae3aecdc7d7c16f3632aeb153b2f83d
Showing with 9 additions and 9 deletions.
  1. +9 −9 config/initializers/cors.rb
@@ -5,12 +5,12 @@

# Read more: https://github.com/cyu/rack-cors

# Rails.application.config.middleware.insert_before 0, Rack::Cors do
# allow do
# origins 'example.com'
#
# resource '*',
# headers: :any,
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
# end
# end
Rails.application.config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'

resource '*',
headers: :any,
methods: [:get, :post, :put, :patch, :delete, :options, :head]
end
end

0 comments on commit 693f5f4

Please sign in to comment.
You can’t perform that action at this time.