Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!