enabled custom middleware