append middleware setting example