Search code examples
netflix-zuulspring-cloud-netflix

Zuul service name exposed instead of route path only


I have a spring-cloud project with zuul gateway.

I told the gateway to route any request from /book-api/** to book-service (rest) by specifying property below in gateway.properties:

zuul.routes.book-service.path=/book-api/**

But it leads me to duplicate api. I able to access same service from both /book-service/getBook and book-api/getBook paths rather than access it from /book-api/getBook path only.

Should I made filter for hiding /book-service/** path?


Solution

  • Please try to add the below property

    zuul.ignored-services=*
    

    All services are added into Zuul routes automatically as default. You can disable it with the above property.

    You can find more detail in 'Embedded Zuul Reverse Proxy' section of the document