Sha256: 77a1fc248bee30d3bc2fd0a683a7a7f9a3012b13b6999ea9573df5504315229d

Contents?: true

Size: 441 Bytes

Versions: 8

Compression:

Stored size: 441 Bytes

Contents

# Avoid CORS issues when API is called from the frontend app
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests

# 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

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
trix_add_on-0.1.4 test/dummy/config/initializers/cors.rb
trix_add_on-0.1.3 test/dummy/config/initializers/cors.rb
trix_add_on-0.1.2 test/dummy/config/initializers/cors.rb
trix_add_on-0.1.1 test/dummy/config/initializers/cors.rb
trix_on_rails-0.1.4 test/dummy/config/initializers/cors.rb
trix_on_rails-0.1.3 test/dummy/config/initializers/cors.rb
trix_on_rails-0.1.1 test/dummy/config/initializers/cors.rb
trix_on_rails-0.1.0 test/dummy/config/initializers/cors.rb