title: Optionally redirect all requests in ServiceStack
body: <p>I have a requirement where one self-hosted instance X optionally handles a request by redirecting it to another self-hosted instance Y on a different machine. Instance X is authenticated against instance Y. It will do the redirection if there is a header "do_redirect". Is there a mechanism that can do this for all autowired services?</p>
  
  <p>I considered extending all endpoints with an interface and handle the redirect per case basis instead of a request header.</p>
  
  <pre><code>public interface IRedirectRequest {
      string ServerUrl {get; set;}
  }
  
  [Route("/api/example", "GET")]
  public class ExampleRoute : IRedirectRequest, IReturn&lt;string&gt;
  {
     //......
  }
  </code></pre>
  
  <p>but I have over a hundred enpoints to that is unfeasable.
  I also tried a global request filter but I learned since I can't write to the response dto directly. </p>
  
  <pre><code>GlobalRequestFilters.Add((request, response, dto) =&gt;
  {
      if (!string.IsNullOrEmpty(request.Headers["do_redirect"]))
      {
          var client = new JsonServiceClient(serverYUrl)
          {
              Credentials = new NetworkCredential(apiKey, "")
  
          };
          // redirect here
          var redirectResponse = client.Send(dto.GetType(), dto);
          // terminate request with data from the other server
          response.Dto = redirectResponse;
          response.EndRequest();
      }
  });
  </code></pre>