Skip to content

Commit

Permalink
Always take in account ALLOW_ORIGIN variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanzdosilovic committed Jan 5, 2020
1 parent 737f391 commit a3a24c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Application < Rails::Application

config.middleware.insert_before 0, Rack::Cors do
allow do
origins Rails.env.development? ? '*' : (ENV['ALLOW_ORIGIN'].presence || '*').split
origins (ENV['ALLOW_ORIGIN'].presence || '*').split
resource '*', headers: :any, methods: :any
end
end
Expand Down

0 comments on commit a3a24c5

Please sign in to comment.