[new] add the route before api

I think to do something before the route callback is  generalduty,so I want to patch for this.