$ luarocks install host-interpolate-by-header
host-interpolate-by-header is a plugin for Kong and is used to dynamically update hostname of upstream service by interpolating url with values of request headers.
How does it work?
1. The plugin reads all the headers from the incoming request specified in the config as `headers`.
2. It transforms the value of the specified headers as per `operation` in the config.
3. It interpolates hostname of the request with above values before making upstream request.
Versions
Dependencies
lua >= 5.1