spree/spree — Issue #872: Can't remove middleware
Author: hoverlover
Created: 2011-12-15 05:06:33+00:00
State: open

Spoke with @radar about this in the #spree room, and he asked me to open an issue for this.

Recently, the middleware calls were added to `Spree::Core::Engine` instead of them being placed into the `config/application.rb` file of the application. I don't use one of the middleware (`SeoAssist`) on my application, so I need to try and delete it now. I tried adding:

Rails.application.config.middleware.delete Spree::Core::Middleware::SeoAssist

to `config/initializers/spree.rb` but it is not being removed. Any requests to `/products?taxon=1` still get redirected to `/t/blah`. This tells me the middleware is still in the stack.