title: Spring boot zuul wrong redirection of request
body: <p>I am developing an API Gateway to redirect a request to some microservice.
  This is part of the application.properties file:</p>
  
  <pre><code>#     _____                                       _____.__
  #    /  _  \ ______ ______     ____  ____   _____/ ____\__| ____
  #   /  /_\  \\____ \\____ \  _/ ___\/  _ \ /    \   __\|  |/ ___\
  #  /    |    \  |_&gt; &gt;  |_&gt; &gt; \  \__(  &lt;_&gt; )   |  \  |  |  / /_/  &gt;
  #  \____|__  /   __/|   __/   \___  &gt;____/|___|  /__|  |__\___  /
  #          \/|__|   |__|          \/           \/        /_____/
  
  server.port=8088
  server.servlet.context-path=/PetApp
  
  #  __________           .__    _________                _____.__
  #  \____    /__ __ __ __|  |   \_   ___ \  ____   _____/ ____\__| ____
  #    /     /|  |  \  |  \  |   /    \  \/ /  _ \ /    \   __\|  |/ ___\
  #   /     /_|  |  /  |  /  |__ \     \___(  &lt;_&gt; )   |  \  |  |  / /_/  &gt;
  #  /_______ \____/|____/|____/  \______  /\____/|___|  /__|  |__\___  /
  #          \/                          \/            \/        /_____/
  
  #Routes for Auth
  zuul.routes.tokenGenerator.path=/auth/login
  zuul.routes.tokenGenerator.url=http://localhost:8086/PetApp_Auth/auth/generateToken
  zuul.routes.tokenGenerator.stripPrefix=false
  </code></pre>
  
  <p>I am trying to redirect the request from the API gateway (<a href="http://localhost:8080/PetApp/auth/login" rel="nofollow noreferrer">http://localhost:8080/PetApp/auth/login</a>) to the service running in (<a href="http://localhost:8086/PetApp_Auth/auth/generateToken" rel="nofollow noreferrer">http://localhost:8086/PetApp_Auth/auth/generateToken</a>)
  I have sent with postman the request directly to the microservice and it works perfectly.</p>
  
  <p>IMPORTANT: I am not adding any authorization header because this endpoint is not securitized (And it works perfectly) but the rest of the API in my auth microservice is securitized</p>
  
  <p><img src="https://i.stack.imgur.com/bVYem.jpg" alt=""></p>
  
  <p>but when I try to send the request through the API gateway I get the following:</p>
  
  <p><img src="https://i.stack.imgur.com/LjvWM.jpg" alt=""></p>
  
  <p>As can be seen, the request is being redirected to the right microservice (Auth service) but not to the right URL, because I have an exception for the rest of the endpoints and URL that is being shown.</p>
  
  <p>I have also tried to put the authorization token previously generated and send in the header, but I get the same not authorized</p>
  
  <p>What I am doing wrong?</p>