Related Documentation
Made by
Kong Inc.
Supported Gateway Topologies
hybrid db-less traditional
Supported Konnect Deployments
hybrid cloud-gateways serverless
Compatible Protocols
grpc grpcs http https

This plugin allows you to route a request to a specific Upstream if it matches one of the configured rules.

How the Route By Header plugin works

Each routing rule consists of a condition object and an upstream_name object. For each request coming into Kong Gateway, the plugin will try to find a rule in which all the headers defined in the condition field have the same value as in the incoming request. The first match dictates the Upstream to which the request is forwarded.

If more than one header is provided in a rule, the plugin looks for all of these headers in the request. A request must contain all of the specified headers with the specified values for a match to occur.

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!