I am developing an API Gateway to redirect a request to some microservice.
This is part of the application.properties file:

```
#     _____                                       _____.__
#    /  _  \ ______ ______     ____  ____   _____/ ____\__| ____
#   /  /_\  \\____ \\____ \  _/ ___\/  _ \ /    \   __\|  |/ ___\
#  /    |    \  |_> >  |_> > \  \__(  <_> )   |  \  |  |  / /_/  >
#  \____|__  /   __/|   __/   \___  >____/|___|  /__|  |__\___  /
#          \/|__|   |__|          \/           \/        /_____/

server.port=8088
server.servlet.context-path=/PetApp

#  __________           .__    _________                _____.__
#  \____    /__ __ __ __|  |   \_   ___ \  ____   _____/ ____\__| ____
#    /     /|  |  \  |  \  |   /    \  \/ /  _ \ /    \   __\|  |/ ___\
#   /     /_|  |  /  |  /  |__ \     \___(  <_> )   |  \  |  |  / /_/  >
#  /_______ \____/|____/|____/  \______  /\____/|___|  /__|  |__\___  /
#          \/                          \/            \/        /_____/

#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

```

I am trying to redirect the request from the API gateway (<http://localhost:8080/PetApp/auth/login>) to the service running in (<http://localhost:8086/PetApp_Auth/auth/generateToken>)
I have sent with postman the request directly to the microservice and it works perfectly.

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

![](https://i.stack.imgur.com/bVYem.jpg)

but when I try to send the request through the API gateway I get the following:

![](https://i.stack.imgur.com/LjvWM.jpg)

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.

I have also tried to put the authorization token previously generated and send in the header, but I get the same not authorized

What I am doing wrong?