title: Rewrite internal eureka based links to external links in zuul proxy
body: <p>I am writing a microservice based application with spring-boot services.</p>
  
  <p>For communication I use REST (with hateoas links). Each service registers with eureka, so I the links I provide are based on these names, so that the ribbon enhanced resttemplates can use the loadbalancing and failover capabilities of the stack.</p>
  
  <p>This works fine for internal communication, but I have a single page admin app that accesses the services through a zuul based reverse proxy.
  When the links are using the real hostname and port the links are correctly rewritten to match the url visible from the outside. This of course doesn't work for the symbolic links that I need in the inside...</p>
  
  <p>So internally I have links like:</p>
  
  <pre><code>http://adminusers/myfunnyusername
  </code></pre>
  
  <p>The zuul proxy should rewrite this to</p>
  
  <pre><code>http://localhost:8090/api/adminusers/myfunnyusername
  </code></pre>
  
  <p>Is there something that I am missing in zuul or somewhere along the way that would make this easier?</p>
  
  <p>Right now I'm thinking how to reliably rewrite the urls myself without collateral damage.</p>
  
  <p>There should be a simpler way, right?</p>