[minor] rename middleware to before