sinatra-cross_origin
sinatra-cross_origin copied to clipboard
Rack lint error when running using rackup
I'm currently experimenting with this and trying to get it work, and I get a 500 from the server with the CORS enabled and running with rackup:
Rack::Lint::LintError: a header value must be a String, but the value of 'Access-Control-Allow-Origin' is a Symbol
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/lint.rb:20:in `assert'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/lint.rb:645:in `block in check_headers'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/utils.rb:490:in `block in each'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/utils.rb:489:in `each'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/utils.rb:489:in `each'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/lint.rb:629:in `check_headers'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/lint.rb:53:in `_call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/lint.rb:37:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/showexceptions.rb:24:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/sinatra-1.4.7/lib/sinatra/base.rb:219:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/chunked.rb:54:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/puma-3.6.0/lib/puma/configuration.rb:225:in `call'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/puma-3.6.0/lib/puma/server.rb:578:in `handle_request'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/puma-3.6.0/lib/puma/server.rb:415:in `process_client'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/puma-3.6.0/lib/puma/server.rb:275:in `block in run'
/Users/timo/.rvm/gems/ruby-2.3.1@reloaded/gems/puma-3.6.0/lib/puma/thread_pool.rb:116:in `block in spawn_thread'
If I drop rackup and just ruby myapp.rb
it seems to work.