Use class Rack::Cors instead of string to fix rails 5 warnings

This commit is contained in:
Patrick Gansterer 2019-10-29 14:43:00 +01:00
parent 8e2ca5e7d7
commit 1773018191
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ module Foodsoft
config.assets.precompile += [ 'vendor/assets/javascripts/*.js' ]
# CORS for API
config.middleware.insert_before 0, 'Rack::Cors' do
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
# this restricts Foodsoft scopes to certain characters - let's discuss it when it becomes an actual problem