move connection params filtering to after middleware excecution