I'm using netflix zuul embedded in a spring boot 1.5.x application. Behind zuul are some microservices. These microservices expose public endpoints under /public/** .
Now i want to expose these public endpoints via zuul api gateway but stripping the "/public" out of the final api gateway url.
Example (expected) from outside (request through zuul api gateway):
api.yourdomain.tld/path/to/service/endpoint
Zuul should forward this request to (with /public in the url):
service:{port}/public/path/to/service/endpoint
How can i achieve this without using url parameter in the zuul configuration. I would like to rely on the internal client side load balancing using serviceId parameters. I couldn't figure it out.
If this isn't a good pattern, should i split my microservices into webservices and core-services? So that only webservices are mounted/accessible via Zuul?
This configuration works fine but it uses the url parameter instead of serviceId:
custom-service:
path: /path/to/service/endpoint/**
stripPrefix: false
url: http://custom-service:51022/public
sensitiveHeaders: