Search code examples
javaspringnetflix-zuul

How to ignore a route in zuul?


I have a spring application, in which I use zuul for routing. My routing configuration is like this:

zuul:
  routes:
    core:
      path: /core/**
      url: http://localhost:3002
    ui:
      path: /**
      url: http://localhost:3003

Now I defined a rest controller in my app, and it should serve the captcah service beside its routing. So I used ignored-services: /captcha/** and even ignored-patterns: /captcha/**

But it don't work and requests for captcah are routed to the ui path.

My using zuul version is: org.springframework.cloud:spring-cloud-starter-zuul:1.0.3.RELEASE


Solution

  • its ignoredPatterns instead of ignored-pattern

    zuul:
        ignoredPatterns:
            - ...........
    routes:
    core:
      path: /core/**
      url: http://localhost:3002
    ui:
      path: /**
      url: http://localhost:3003