Sha256: 7cf2e5f18df58baf774eaedc6aa6a98126750a2a68d70c04013152455d8b4949
Contents?: true
Size: 687 Bytes
Versions: 56
Compression:
Stored size: 687 Bytes
Contents
# Be sure to restart your server when you modify this file. # 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 ['localhost'] resource '*', headers: :any, methods: [:get, :post, :put, :patch, :delete, :options, :head], expose: %w[ X-Requested-With Content-Type Authorization Accept Accept-Encoding Access-Control-Allow-Credentials ], credentials: true end end
Version data entries
56 entries across 56 versions & 1 rubygems