Search code examples
javaspring-bootspring-securitymicroservicesnetflix-zuul

Make Zuul the unique entry point of my application


My application contains a service named "service" on port 8081 with some APIs like

  • localhost:8081/api/services
  • localhost:8081/api/services/id
  • ...

With Zuul which run on port 8761, I can now access to these APIs like that

  • localhost:8761/service/api/services
  • localhost:8761/service/api/services/id

However, it is still possible to use the previous APIs (directly to the service). How is it possible to block them, in order to make Zuul the unique entry point ?


Solution

  • If you run a service bound to localhost it is only accessible from that box. You don't need to do any more than that.