add proxy middleware