mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
We are moving bulk edit to a different route and we want to be able to handle redirects on this route. Handling this at the rack level before the rails stack is the most performant way outside of rewrites on the web server itself.
8 lines
239 B
Ruby
8 lines
239 B
Ruby
module Openfoodnetwork
|
|
class Application < Rails::Application
|
|
config.middleware.insert_before(Rack::Lock, Rack::Rewrite) do
|
|
r301 '/admin/products/bulk_edit', '/admin/products' # TODO: Date added 15/06/2018
|
|
end
|
|
end
|
|
end
|