Dynamically change the request URLv3.10+

Configure the plugin to send a request to a different URL based on a header value.

In this example, we’re expecting the client to provide a x-custom-header header with a value to append to the specified URL.

You can use the by_lua field to dynamically modify any of the request parameters under config.callouts.request for a particular callout.

Environment variables

  • API_URL: The API endpoint to use to request a token.

Set up the plugin

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!