2024-02-25 12:15:55 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-16 19:09:39 -04:00
|
|
|
# Be sure to restart your server when you modify this file.
|
|
|
|
|
|
|
|
# Avoid CORS issues when API is called from the frontend app.
|
2024-01-25 16:05:29 -05:00
|
|
|
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests.
|
2018-04-16 19:09:39 -04:00
|
|
|
|
|
|
|
# Read more: https://github.com/cyu/rack-cors
|
|
|
|
|
|
|
|
# Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
|
|
|
# allow do
|
2022-10-10 07:22:35 -04:00
|
|
|
# origins "example.com"
|
2018-04-16 19:09:39 -04:00
|
|
|
#
|
2022-10-10 07:22:35 -04:00
|
|
|
# resource "*",
|
2018-04-16 19:09:39 -04:00
|
|
|
# headers: :any,
|
|
|
|
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
|
|
|
|
# end
|
|
|
|
# end
|