Moved middleware configuration to init.rb