Sometimes it is necessary to set a different path for services invoked via a gateway rather than allow them being available directly. In that case, Zuul provides the ability to add prefixes to all the defined mappings. This may be easily configured with the zuul.prefix property. By default, Zuul cuts that prefix before forwarding requests to the services. However, that behavior can also be disabled by setting the zuul.stripPrefix property to false. A stripPrefix property may be configured not only globally for all defined routes, but also per single route.
Here's an example that adds the /api prefix to all the forwarded requests. Now, for example, if you would like to call the GET /{id} endpoint from account-service ...