Skip to content

Commit a3f9594

Browse files
committed
Add Flash and MethodOverride middlewares only to MC engine
And not to the whole app, as these might interfere with other middlewares such as `Rack::RewindableInput`. Thanks to @mintuhouse for realising this. Fixes #207.
1 parent a20acae commit a3f9594

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mission_control/jobs/engine.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class Engine < ::Rails::Engine
99

1010
initializer "mission_control-jobs.middleware" do |app|
1111
if app.config.api_only
12-
app.middleware.use ActionDispatch::Flash
13-
app.middleware.use ::Rack::MethodOverride
12+
config.middleware.use ActionDispatch::Flash
13+
config.middleware.use ::Rack::MethodOverride
1414
end
1515
end
1616

0 commit comments

Comments
 (0)