Redirect all consumer request to specific upstream

Is it possible to choose an different upstream based on an arbitrary header?
I want to be able to redirect all incoming calls made by a consumer to a upstream (set of hosts) build specific for this consumer (client).

Yes, you just need to create two services to different upstreams and then create route objects with the same path but different header under each service.

services:
- name: service-one
  url: http://upstream-one
  routes:
  - name: route-one
    headers:
      x-client:
      - client1
    protocols:
      - http
      - https
    paths:
      - /api

- name: service-two
  url: https://upstream-two
  routes:
  - name: route-one
    headers:
      x-client:
      - client2
    protocols:
      - http
      - https
    paths:
      - /api

Hi @foom, thanks for the reply.

Do you think is possible to do it with only one service?
There’s a plugin that checks the header but it’s Enterprise only.