add connect middleware to support post