Skip to content

Commit 354263e

Browse files
committed
Update Rack::Cors configuration in production environment
1 parent 571eef7 commit 354263e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

config/environments/production.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@
9191
# Do not dump schema after migrations.
9292
config.active_record.dump_schema_after_migration = false
9393

94-
config.middleware.insert_before(0, Rack::Cors) do
94+
config.middleware.insert_before 0, Rack::Cors do
9595
allow do
96-
origins 'https://codelearn-api-72b30d70ca73.herokuapp.com/'
97-
resource '*', headers: :any, methods: %i[get post patch put delete options]
96+
origins '*'
97+
resource '*',
98+
headers: :any,
99+
methods: %i[get post patch put delete options head]
98100
end
99101
end
100102
end

0 commit comments

Comments
 (0)