added options for post middleware