Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

140
Vistas
zuul API Gateway Filter

I am facing problem when i trying to access another REST API(registered in ZUUL route) from zuul pre-filter, the call is becoming recursive i.e its running my pre-filter code again and again. My Usecase is as follows-

  1. In Zuul PreFilter run() method, I am validating the token passed in the header.

  2. After validating the token, I am calling one rest service(User Location Service) to fetch the user details. My User Location Service is itself registered in ZUUL as below:

    user-location-service:
      path: /userLocationService/**
      url: http://localhost:9002
    

The problem is that the JWT token validation code is running again and again, Can you please suggest some solution where I can apply the call Userlocation service so that the PreFilter code would not run again and again?

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Your User Location Service is registred in Zuul. So, all the times your filter is going to be executed when you got caugth in an infinite loop.

There are two approaches here:

  • Do not pass again to the gateway and call direct User Location Service
  • OR, Create a filter rule in your ZUll Authentication Filter to not consider the User Location Service. You can use the URL Path Context to exclude this route to be executed
about 4 years ago · Santiago Trujillo Denunciar

0

you need to allow sensitiveHeaders.

     zuul:
        routes:
            resource:
                path: /resource/**
                url: http://localhost:8002/
                sensitiveHeaders: Cookie,Set-Cookie
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda