MariuszS
MariuszS

Reputation: 31577

Zuul routes to services with nested path

I'm trying to configure Netflix Zuul routes to two microservices (which are based on spring boot).

I was trying something like this, but dosen't work:

zuul:
  routes:
    foo: /foo/**
    bar: /foo/*/bar/**

Is possible such configuration, when paths are nested?

Configuration like this is required, because /bar/ subresource is operated by bar microservice.

Context on foo: /foo/

Context on bar: /foo/*/bar/**

Upvotes: 2

Views: 2067

Answers (1)

MariuszS
MariuszS

Reputation: 31577

Solution

zuul:
  routes:
    bar:
      path: /foo/*/bar/**
      serviceId: bar
      stripPrefix: false
    foo:
      path: /foo/**
      serviceId: foo
      stripPrefix: false

Upvotes: 3

Related Questions