“Rails Cors erlauben alle” Code-Antworten

Rails Cors erlauben alle

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'
Dead Dogfish

Rails Cors erlauben alle

config.middleware.insert_before 0, Rack::Cors do
      allow do
        origins '*'
        resource '*', :headers => :any, :methods => [:get, :post, :options]
      end
    end
Dead Dogfish

Rails Cors erlauben alle

gem 'rack-cors', :require => 'rack/cors'
Dead Dogfish

Ähnliche Antworten wie “Rails Cors erlauben alle”

Fragen ähnlich wie “Rails Cors erlauben alle”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen