Answers for "rails cors allow all"

0

rails cors allow all

config.middleware.insert_before 0, Rack::Cors do
      allow do
        origins '*'
        resource '*', :headers => :any, :methods => [:get, :post, :options]
      end
    end
Posted by: Guest on July-19-2021
0

rails cors allow all

gem 'rack-cors', :require => 'rack/cors'
Posted by: Guest on July-19-2021
0

rails cors allow all

headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, PUT, DELETE, GET, OPTIONS'
headers['Access-Control-Request-Method'] = '*'
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept, Authorization'
Posted by: Guest on July-19-2021

Browse Popular Code Answers by Language