diff --git a/config/initializers/008-rack-cors.rb b/config/initializers/008-rack-cors.rb index 83f77d44c1a..c5d476f715b 100644 --- a/config/initializers/008-rack-cors.rb +++ b/config/initializers/008-rack-cors.rb @@ -37,5 +37,5 @@ if GlobalSetting.enable_cors end end - Rails.configuration.middleware.use Discourse::Cors + Rails.configuration.middleware.insert_before ActionDispatch::Flash, Discourse::Cors end