You are browsing documentation for an outdated plugin version.
Configuration
This plugin is compatible with DB-less mode.
Parameters
Here's a list of all the parameters which can be used in this plugin's configuration:
-
name or plugin
string requiredThe name of the plugin, in this case
request-transformer
.- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
name
. - If using the KongPlugin object in Kubernetes, the field is
plugin
.
- If using the Kong Admin API, Konnect API, declarative configuration, or decK files, the field is
-
service.name or service.id
stringThe name or ID of the service the plugin targets. Set one of these parameters if adding the plugin to a service through the top-level
/plugins
endpoint. Not required if using/services/{serviceName|Id}/plugins
. -
route.name or route.id
stringThe name or ID of the route the plugin targets. Set one of these parameters if adding the plugin to a route through the top-level
/plugins
endpoint. Not required if using/routes/{routeName|Id}/plugins
. -
consumer.name or consumer.id
stringThe name or ID of the consumer the plugin targets. Set one of these parameters if adding the plugin to a consumer through the top-level
/plugins
endpoint. Not required if using/consumers/{consumerName|Id}/plugins
. -
enabled
boolean default:true
Whether this plugin will be applied.
-
config
record required-
http_method
string matches:^%u+$
Sets the HTTP method for the upstream request.
-
remove
record required-
body
array of typestring
requiredList of parameter names. Remove the parameter if and only if content-type is one the following: [
application/json
,multipart/form-data
,application/x-www-form-urlencoded
] and the parameter is present.
-
headers
array of typestring
requiredList of header names. Unset the headers with the given name.
-
querystring
array of typestring
requiredList of querystring names. Remove the querystring if it is present.
-
-
rename
record required-
body
array of typestring
requiredList of
paramname:value
pairs. Rename the parameter name if and only if content-type is one the following [application/json
,multipart/form-data
,application/x-www-form-urlencoded
] and the parameter is present.
-
headers
array of typestring
requiredList of
headername:value
pairs. If and only if the header is already set, rename the header. The value is unchanged. Ignored if the header is not already set.
-
querystring
array of typestring
requiredList of queryname:value pairs. If and only if the field name is already set, rename the field name. The value is unchanged. Ignored if the field name is not already set.
-
-
replace
record required-
body
array of typestring
requiredList of
paramname:value
pairs. If and only if content-type is one the following [application/json
,multipart/form-data
,application/x-www-form-urlencoded
] and the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.
-
headers
array of typestring
requiredList of
headername:value
pairs. If and only if the header is already set, replace its old value with the new one. Ignored if the header is not already set.
-
querystring
array of typestring
requiredList of
queryname:value pairs
. If and only if the field name is already set, replace its old value with the new one. Ignored if the field name is not already set.
-
uri
stringUpdates the upstream request URI with a given value. This value can be used to update only the path part of the URI, not the scheme or the hostname.
-
-
add
record required-
body
array of typestring
requiredList of
paramname:value
pairs. If and only if content-type is one the following [application/json
,multipart/form-data
,application/x-www-form-urlencoded
] and the parameter is not present, add a new parameter with the given value to the form-encoded body. Ignored if the parameter is already present.
-
headers
array of typestring
requiredList of
headername:value
pairs. If and only if the header is not already set, set a new header with the given value. Ignored if the header is already set.
-
querystring
array of typestring
requiredList of
queryname:value
pairs. If and only if the querystring is not already set, set a new querystring with the given value. Ignored if the querystring is already set.
-
-
append
record required-
body
array of typestring
requiredList of
paramname:value
pairs. If the content-type is one the following [application/json
,application/x-www-form-urlencoded
], add a new parameter with the given value if the parameter is not present. Otherwise, if it is already present, aggregate the two values (old and new) in an array.
-
headers
array of typestring
requiredList of
headername:value
pairs. If the header is not set, set it with the given value. If it is already set, an additional new header with the same name and the new value will be appended.
-
querystring
array of typestring
requiredList of
queryname:value
pairs. If the querystring is not set, set it with the given value. If it is already set, a new querystring with the same name and the new value will be set.
-
-