update middleware settings