Code samples for proxy middleware