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

View file

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