Request Callout

Enterprise only

Dynamically change the request URL via request.by_lua Lua codev3.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

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!