📜  rails cors allow all - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:09.004000             🧑  作者: Mango

代码示例3
config.middleware.insert_before 0, Rack::Cors do
      allow do
        origins '*'
        resource '*', :headers => :any, :methods => [:get, :post, :options]
      end
    end