Route requests based on a location header

Configure the plugin to route request to different Upstreams based on the value of the location header. See Route requests to different Upstreams based on headers for a full how-to guide with this example.

Prerequisites

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: route-by-header
    config:
      rules:
      - upstream_name: east-upstream
        condition:
          location: us-east
      - upstream_name: west-upstream
        condition:
          location: us-west
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!