Add custom response header with Rack-cors and Grape
问题 I'm developing a Ionic(Cordova) app with a Ruby on Rails API. I want to use response headers to return a token after login. I'm using rack-cors gem to make Cross Origin Request work: application.rb config.middleware.insert_after Rails::Rack::Logger, Rack::Cors, :logger => Rails.logger do allow do origins '*' resource '/api/*', :headers => :any, :methods => [:get, :post, :options, :put] end end and grape gem to manage my API routes. But i can't find a way to add a header to my response since i