put middleware at servers