Add Sinatra middleware.