add auto info middleware