Add middlewares to server option