Update client_middleware.rb